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 Class<?>directByteBufferClass()static ByteBufferguaranteeDirectByteBuffer(ByteBuffer directBuffer)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 booleanisDirectByteBuffer(ByteBuffer byteBuffer)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 booleanto_boolean(byte value)static byteto_byte(boolean value)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)
-
Constructor Details
-
XTypes
public XTypes()
-
-
Method Details
-
directByteBufferClass
-
isDirectByteBuffer
-
guaranteeDirectByteBuffer
-
isBooleanType
-
isByteType
-
isShortType
-
isIntegerType
-
isLongType
-
isFloatType
-
isDoubleType
-
isCharacterType
-
isStringType
-
isCharSequenceType
-
isNaturalNumberType
-
isDecimalType
-
isNumberType
-
isLiteralType
-
isValueType
-
isNaturalNumber
-
isNumber
-
isDecimal
-
isLiteral
-
isBoolean
-
isValueType
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
-
to_byte
public static final byte to_byte(boolean value) -
to_boolean
public static final boolean to_boolean(byte value) -
to_int
public static final int to_int(boolean value) -
to_int
- Throws:
NumberRangeException
-
to_int
- Throws:
NumberRangeException
-
to_int
- Throws:
NumberRangeException
-
to_int
-
asByte
-
asShort
-
asInteger
-
asFloat
-
asLong
-
asDouble
-
createDefaultTypeSimilarity
-