public class DefaultTypeHandlers extends Object
TypeHandlers
for converting numeric and other basic Java
types to standard PCP types.Modifier and Type | Field and Description |
---|---|
static TypeHandler<AtomicBoolean> |
ATOMIC_BOOLEAN_AS_INT
Converts an
AtomicBoolean into a PCP unsigned 32-bit integer. |
static TypeHandler<Boolean> |
BOOLEAN_AS_INT
Converts a
Boolean into a PCP signed 32-bit integer. |
static TypeHandler<Number> |
NUMBER_AS_DOUBLE
Converts a
Number into a PCP double. |
static TypeHandler<Number> |
NUMBER_AS_FLOAT
Converts a
Number into a PCP double. |
static TypeHandler<Number> |
NUMBER_AS_INTEGER
Converts a
Number into a PCP signed 32-bit integer. |
static TypeHandler<Number> |
NUMBER_AS_LONG
Converts a
Number into a PCP signed 64-bit integer. |
Constructor and Description |
---|
DefaultTypeHandlers() |
Modifier and Type | Method and Description |
---|---|
static Map<Class<?>,TypeHandler<?>> |
getDefaultMappings() |
public static final TypeHandler<Number> NUMBER_AS_INTEGER
Number
into a PCP signed 32-bit integer. May cause loss of precision if
the supplied Number can not be reasonably coerced into an integer.public static final TypeHandler<Number> NUMBER_AS_LONG
Number
into a PCP signed 64-bit integer. May cause loss of precision if
the supplied Number has a floating-point component.public static final TypeHandler<Number> NUMBER_AS_DOUBLE
Number
into a PCP double. May cause loss of precision if the supplied
Number is not a double.public static final TypeHandler<Number> NUMBER_AS_FLOAT
Number
into a PCP double. May cause loss of precision if the supplied
Number is not a float.public static final TypeHandler<Boolean> BOOLEAN_AS_INT
Boolean
into a PCP signed 32-bit integer.public static final TypeHandler<AtomicBoolean> ATOMIC_BOOLEAN_AS_INT
AtomicBoolean
into a PCP unsigned 32-bit integer.public static Map<Class<?>,TypeHandler<?>> getDefaultMappings()
Copyright © 2009-2018 Performance Co-Pilot. All Rights Reserved.