public abstract static class AbstractDecimal.AbstractDecimalSerializer<V extends AbstractDecimal> extends Object implements OrderPreservingSerializer<V>
| Constructor and Description |
|---|
AbstractDecimal.AbstractDecimalSerializer(int decimals,
Class<V> type) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract V |
construct(long format,
int decimals) |
V |
convert(Object value)
Converts the given (not-null) value to the expected datatype V.
|
V |
read(ScanBuffer buffer)
Reads an attribute from the given ReadBuffer.
|
V |
readByteOrder(ScanBuffer buffer)
Reads an attribute from the given ReadBuffer assuming it was written in byte order.
|
void |
verifyAttribute(V value)
Verifies the given (not-null) attribute value is valid.
|
void |
write(WriteBuffer buffer,
V attribute)
Writes the attribute value to the given WriteBuffer.
|
void |
writeByteOrder(WriteBuffer buffer,
V attribute)
Writes the attribute value to the given WriteBuffer such that the byte order of the result is equal to the
natural order of the attribute.
|
protected abstract V construct(long format, int decimals)
public V read(ScanBuffer buffer)
AttributeSerializerread in interface AttributeSerializer<V extends AbstractDecimal>buffer - ReadBuffer to read attribute frompublic void write(WriteBuffer buffer, V attribute)
AttributeSerializerwrite in interface AttributeSerializer<V extends AbstractDecimal>buffer - WriteBuffer to write attribute toattribute - Attribute to write to WriteBufferpublic V readByteOrder(ScanBuffer buffer)
OrderPreservingSerializerreadByteOrder in interface OrderPreservingSerializer<V extends AbstractDecimal>buffer - ReadBuffer to read attribute frompublic void writeByteOrder(WriteBuffer buffer, V attribute)
OrderPreservingSerializerwriteByteOrder in interface OrderPreservingSerializer<V extends AbstractDecimal>buffer - WriteBuffer to write attribute toattribute - Attribute to write to WriteBufferpublic void verifyAttribute(V value)
AttributeHandlerIllegalArgumentException if the value is invalid,
otherwise simply returns.verifyAttribute in interface AttributeHandler<V extends AbstractDecimal>value - to verifypublic V convert(Object value)
AttributeHandlerIllegalArgumentException if it cannot be converted.convert in interface AttributeHandler<V extends AbstractDecimal>value - to convertCopyright © 2012–2014. All rights reserved.