public class PropertyValueStrategyFactory extends Object
PropertyValue value.| Modifier and Type | Method and Description |
|---|---|
static int |
compare(Object value,
Object other)
Compares two values.
PropertyValue.NULL_VALUE is considered to be less than all other properties. |
static Object |
fromRawBytes(byte[] bytes)
Returns value which is represented by the the provided byte array.
|
static PropertyValueStrategy |
get(byte value)
Returns strategy mapping to the provided byte value.
|
static PropertyValueStrategy |
get(Class clazz)
Get a strategy which corresponds the provided class.
|
static PropertyValueStrategy |
get(Object value)
Get strategy by object.
|
static byte[] |
getRawBytes(Object value)
Get byte array representation of the provided object.
|
public static Object fromRawBytes(byte[] bytes)
PropertyValue standard.bytes - byte array of raw bytes.public static int compare(Object value, Object other)
PropertyValue.NULL_VALUE is considered to be less than all other properties.
If other is not comparable to value, the used PropertyValueStrategy will throw an
IllegalArgumentException. This behavior violates the requirements of
Comparable.compareTo(T).
value - first value.other - second value.value is less than, equal
to, or greater than other.public static byte[] getRawBytes(Object value)
PropertyValue standard.
If the given type is not supported, an UnsupportedTypeException will be thrown.value - to be serialized.public static PropertyValueStrategy get(byte value) throws UnsupportedTypeException
value - representing a data type.UnsupportedTypeException - when there is no matching strategy for a given type byte.public static PropertyValueStrategy get(Class clazz) throws UnsupportedTypeException
null, an instance of
NullStrategy is returned.clazz - some classUnsupportedTypeException - when there is no matching strategy for the given class.public static PropertyValueStrategy get(Object value) throws UnsupportedTypeException
value - some object.null,
NullStrategy is returned.UnsupportedTypeException - when there is no matching strategy for a given object.Copyright © 2014 - 2019–2019 University of Leipzig. All rights reserved.