protected static boolean isPrimitiveType(String typeName) { return BOXED_TO_PRIMITIVE_TYPES.containsValue(typeName); }
public static int getLog2mFromHllFieldSize(int hllFieldSize) { Preconditions.checkArgument(LOG2M_TO_SIZE_IN_BYTES.containsValue(hllFieldSize), "HllFieldSize: " + hllFieldSize + " is not in valid range."); return LOG2M_TO_SIZE_IN_BYTES.inverse().get(hllFieldSize); } }
public boolean tierExists(final Byte tierId) { return orderedSfcIndexToTierId.containsValue(tierId); }
public static boolean isPrimitiveOrBoxedClass(Class<?> t) { // TODO maybe better to switch to using Primitives, eg: // return Primitives.allPrimitiveTypes().contains(type) || Primitives.allWrapperTypes().contains(type); if (t==null) return false; if (t.isPrimitive()) return true; if (PRIMITIVE_TO_BOXED.containsValue(t)) return true; return false; }
public static boolean isImmutableType(Type type) { return MUTABLE_TO_IMMUTABLE_CLASS_NAME_MAP.containsValue(getTypeQualifiedName(type)); }
/** returns name of primitive corresponding to the given (boxed or unboxed) type */ public static Maybe<String> getPrimitiveName(Class<?> type) { if (type!=null) { if (PRIMITIVE_TO_BOXED.containsKey(type)) return Maybe.of(type.getName()); if (PRIMITIVE_TO_BOXED.containsValue(type)) { return Maybe.of(PRIMITIVE_TO_BOXED.inverse().get(type).getName()); } } return Maybe.absent("Not a primitive or boxed primitive: "+type); }
final ImmutableBiMap<String, String> nsMap = ImmutableBiMap.copyOf(namespaceMapping); if (nsMap.containsValue(namespace)) { LOGGER.debug("Discovered namespace: {} in namespace map: {}.", namespace, nsMap);