Package one.microstream.typing
Class XTypes
- java.lang.Object
-
- one.microstream.typing.XTypes
-
public final class XTypes extends Object
Collection of generic util logic missing or too complicated in JDK API.
-
-
Constructor Summary
Constructors Constructor Description XTypes()
-
Method Summary
Modifier and Type Method Description static ByteasByte(Number value)static DoubleasDouble(Number value)static FloatasFloat(Number value)static IntegerasInteger(Number value)static LongasLong(Number value)static ShortasShort(Number value)static TypeMapping<Float>createDefaultTypeSimilarity()static booleanisBoolean(Object o)static booleanisBooleanType(Class<?> c)static booleanisByteType(Class<?> c)static booleanisCharacterType(Class<?> c)static booleanisCharSequenceType(Class<?> c)static booleanisDecimal(Object o)static booleanisDecimalType(Class<?> c)static booleanisDoubleType(Class<?> c)static booleanisFloatType(Class<?> c)static booleanisIntegerType(Class<?> c)static booleanisLiteral(Object o)static booleanisLiteralType(Class<?> c)static booleanisLongType(Class<?> c)static booleanisNaturalNumber(Object o)static booleanisNaturalNumberType(Class<?> c)static booleanisNumber(Object o)static booleanisNumberType(Class<?> c)static booleanisPrimitiveWrapper(Object o)static booleanisShortType(Class<?> c)static booleanisStringType(Class<?> c)static booleanisValueType(Class<?> c)static booleanisValueType(Object o)Checks if the type of the passed instance is an immutable special value type of the java language.static intto_int(boolean value)static intto_int(double value)static intto_int(float value)static intto_int(long value)static intto_int(Number value)
-
-
-
Method Detail
-
isBooleanType
public static boolean isBooleanType(Class<?> c)
-
isByteType
public static boolean isByteType(Class<?> c)
-
isShortType
public static boolean isShortType(Class<?> c)
-
isIntegerType
public static boolean isIntegerType(Class<?> c)
-
isLongType
public static boolean isLongType(Class<?> c)
-
isFloatType
public static boolean isFloatType(Class<?> c)
-
isDoubleType
public static boolean isDoubleType(Class<?> c)
-
isCharacterType
public static boolean isCharacterType(Class<?> c)
-
isStringType
public static boolean isStringType(Class<?> c)
-
isCharSequenceType
public static boolean isCharSequenceType(Class<?> c)
-
isNaturalNumberType
public static boolean isNaturalNumberType(Class<?> c)
-
isDecimalType
public static boolean isDecimalType(Class<?> c)
-
isNumberType
public static boolean isNumberType(Class<?> c)
-
isLiteralType
public static boolean isLiteralType(Class<?> c)
-
isValueType
public static boolean isValueType(Class<?> c)
-
isNaturalNumber
public static boolean isNaturalNumber(Object o)
-
isNumber
public static boolean isNumber(Object o)
-
isDecimal
public static boolean isDecimal(Object o)
-
isLiteral
public static boolean isLiteral(Object o)
-
isBoolean
public static boolean isBoolean(Object o)
-
isValueType
public static boolean isValueType(Object o)
Checks if the type of the passed instance is an immutable special value type of the java language. This includes all primitive wrappers andString.- Parameters:
o- the instance to be checked- Returns:
trueif the type of the passed instance is an immutable special value type.
-
isPrimitiveWrapper
public static boolean isPrimitiveWrapper(Object o)
-
to_int
public static final int to_int(boolean value)
-
to_int
public static final int to_int(long value) throws NumberRangeException- Throws:
NumberRangeException
-
to_int
public static final int to_int(float value) throws NumberRangeException- Throws:
NumberRangeException
-
to_int
public static final int to_int(double value) throws NumberRangeException- Throws:
NumberRangeException
-
to_int
public static final int to_int(Number value) throws NumberRangeException, NullPointerException
-
createDefaultTypeSimilarity
public static final TypeMapping<Float> createDefaultTypeSimilarity()
-
-