public final class DecimalSerializableType extends PlainSerializableType<BigDecimal>
SerializableType for numeric ranges. This type handles integral as well as real
and fractional ranges using Java's BigDecimal type.| Constructor and Description |
|---|
DecimalSerializableType(BigDecimal min,
BigDecimal max,
BigDecimal increment) |
| Modifier and Type | Method and Description |
|---|---|
<S> BigDecimal |
deserializeValue(S elem,
ValueSerializer<S,?> serializer)
Deserializes a config primitive from a serialized form.
|
boolean |
equals(Object o)
Two serialized types are equal if and only if they are of the same kind
and both have the same constraints.
|
BigDecimal |
getIncrement() |
BigDecimal |
getMaximum() |
BigDecimal |
getMinimum() |
int |
hashCode() |
<S> void |
serialize(TypeSerializer<S> serializer,
S target)
Serializes this type to a persistent format using the given
TypeSerializer. |
<S> S |
serializeValue(BigDecimal value,
ValueSerializer<S,?> serializer)
Serializes a config primitive to a serialized form.
|
String |
toString() |
cast, getErasedPlatformType, getGenericPlatformTypeaccepts, isAssignableFrom, testpublic DecimalSerializableType(@Nullable BigDecimal min, @Nullable BigDecimal max, @Nullable BigDecimal increment)
@Nullable public BigDecimal getMinimum()
@Nullable public BigDecimal getMaximum()
@Nullable public BigDecimal getIncrement()
public <S> void serialize(TypeSerializer<S> serializer, S target)
SerializableTypeTypeSerializer.serialize in class SerializableType<BigDecimal>S - The type to serialize to.serializer - The type serializer to use.target - The place to which this type is serialized.TypeSerializerpublic <S> S serializeValue(BigDecimal value, ValueSerializer<S,?> serializer)
SerializableTypeSerializableType.cast(Object) and additionally
satisfy this type's particular constraints.serializeValue in class SerializableType<BigDecimal>S - The type of the serialized form.value - The value to serialize.serializer - A ValueSerializer defining the serialized form.public <S> BigDecimal deserializeValue(S elem, ValueSerializer<S,?> serializer) throws ValueDeserializationException
SerializableTypedeserializeValue in class SerializableType<BigDecimal>S - The type of the serialized form.elem - The serialized form of the value.serializer - A ValueSerializer defining the serialized form.ValueDeserializationException - If a value cannot be deserialized.public boolean equals(Object o)
SerializableTypeequals in class SerializableType<BigDecimal>public int hashCode()
hashCode in class SerializableType<BigDecimal>public String toString()
toString in class SerializableType<BigDecimal>