Returns the first matching meaning of the specified types.
Returns Types.UNKNOWN if there are no matches.
553046
public int getMeaningAs(int[] types) {

        for (int i = 0; i < types.length; i++) {
            if (isA(types[i])) {
                return types[i];
            }
        }

        return Types.UNKNOWN;
    }
827882
def _get_names(names, types):
    
    if types == "":
        try:
            names, types = names.split(":")
        except:
            pass
    return names.split(","), types
450592
def __get_types(for_type=None, for_types=None):
        
        if for_type:
            if for_types:
                raise ValueError("Cannot pass both for_type and for_types.")
            for_types = (for_type,)
        elif for_types:
            if not isinstance(for_types, tuple):
                raise TypeError("for_types must be passed as a tuple of "
                                "types (classes).")
        else:
            raise ValueError("Must pass either for_type or for_types.")

        return for_types
712449
static String parms(String types) {
        int[] pos = new int[] { 0 };
        StringBuilder sb = new StringBuilder();

        boolean first = true;

        String t;

        while ((t = desc(types, pos)) != null) {
            if (first) {
                first = false;
            } else {
                sb.append(',');
            }
            sb.append(t);
        }

        return sb.toString();
    }
433633
public List<Class<?>> getRawTypes(List<DomainObjectType> types) {
		List<Class<?>> resultList = new ArrayList<Class<?>>();
		for (DomainObjectType type : types) {
			resultList.add(type.getType());
		}
		return resultList;
	}
1293366
def _resolved_type(self):
        """"""
        import datetime

        self.type_ratios = {test: (float(self.type_counts[test]) / float(self.count)) if self.count else None
                            for test, testf in tests + [(None, None)]}

        # If it is more than 5% str, it's a str

        try:
            if self.type_ratios.get(text_type,0) + self.type_ratios.get(binary_type,0) > .05:
                if self.type_counts[text_type] > 0:
                    return text_type, False

                elif self.type_counts[binary_type] > 0:
                    return binary_type, False
        except TypeError as e:
            # This is probably the result of the type being unknown
            pass


        if self.type_counts[datetime.datetime] > 0:
            num_type = datetime.datetime

        elif self.type_counts[datetime.date] > 0:
            num_type = datetime.date

        elif self.type_counts[datetime.time] > 0:
            num_type = datetime.time

        elif self.type_counts[float] > 0:
            num_type = float

        elif self.type_counts[int] > 0:
            num_type = int

        elif self.type_counts[text_type] > 0:
            num_type = text_type

        elif self.type_counts[binary_type] > 0:
            num_type = binary_type

        else:
            num_type = unknown

        if self.type_counts[binary_type] > 0 and num_type != binary_type:
            has_codes = True
        else:
            has_codes = False

        return num_type, has_codes
504790
public static String[] getTypeStrs(Class[] types, boolean javaStyle) {
        if (CommonUtils.isEmpty(types)) {
            return StringUtils.EMPTY_STRING_ARRAY;
        } else {
            String[] strings = new String[types.length];
            for (int i = 0; i < types.length; i++) {
                strings[i] = javaStyle ? types[i].getName() : getTypeStr(types[i]);
            }
            return strings;
        }
    }
1187405
protected static <T> Class<T> firstKnownType(T... objects) {
        for (T obj : objects)
            if (obj != null)
                return (Class<T>) obj.getClass();
        return null;
    }
59986
def guess_type(typ):
    ''''''
    # Strip useless numbers
    match = re.match("([a-zA-Z]+)\d*", typ)
    if match:
        typ = match.groups()[0]
        return typ
780234
public static int getDefaultFlags(Type1Message type1) {
        if (type1 == null) return DEFAULT_FLAGS;
        int flags = NTLMSSP_NEGOTIATE_NTLM;
        int type1Flags = type1.getFlags();
        flags |= ((type1Flags & NTLMSSP_NEGOTIATE_UNICODE) != 0) ?
                NTLMSSP_NEGOTIATE_UNICODE : NTLMSSP_NEGOTIATE_OEM;
        if ((type1Flags & NTLMSSP_REQUEST_TARGET) != 0) {
            String domain = getDefaultDomain();
            if (domain != null) {
                flags |= NTLMSSP_REQUEST_TARGET | NTLMSSP_TARGET_TYPE_DOMAIN;
            }
        }
        return flags;
    }
111812
def guess_type(s):
    
    sc = s.replace(',', '') # remove comma from potential numbers

    try:
        return int(sc)
    except ValueError:
        pass

    try:
        return float(sc)
    except ValueError:
        pass

    return s
393082
def types(cls):
        
        redundant_types = \
            set(cls.types_mapping) & set(cls._types_from_methods)
        if redundant_types:
            warn("These types are defined both with a method and in the"
                 "'types_mapping' property of this validator: %s"
                 % redundant_types)

        return tuple(cls.types_mapping) + cls._types_from_methods
136758
def find_types(observatory, match=None, trend=None,
               connection=None, **connection_kw):
    
    return sorted(connection.find_types(observatory, match=match),
                  key=lambda x: _type_priority(observatory, x, trend=trend))
260200
@SuppressWarnings("unchecked")
  public <T> ValueReader<T> getFirstSupportedReader(Class<T> type) {
    return (ValueReader<T>) valueReaders.first(type);
  }
178354
def get_type(self):
        
        for typechar, typename in self.KEY_TYPE_CHOICES:
            if typechar == self.key_type:
                return typename
69451
def get_type(self):
        
        if self.total_size() == 0:
            return CONSTANT_TYPE_NULL
        return unpack_from(FMT_BE_INT, self._buffer, TYPE_OFFSET)[0]
432762
public List<Class<?>> getTypes(boolean noAbstractTypes) {
		List<Class<?>> typeList = new ArrayList<Class<?>>();
		this.addType(typeList, noAbstractTypes);
		return typeList;
	}