public class NoSerializer<V> extends Object implements AttributeSerializer<V>
Constructor and Description |
---|
NoSerializer(Class<V> datatype) |
Modifier and Type | Method and Description |
---|---|
V |
convert(Object value)
Converts the given (not-null) value to the expected data type V.
|
V |
read(ScanBuffer buffer)
Reads an attribute from the given ReadBuffer.
|
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.
|
public V read(ScanBuffer buffer)
AttributeSerializer
It is expected that this read operation adjusts the position in the ReadBuffer to after the attribute value.
read
in interface AttributeSerializer<V>
buffer
- ReadBuffer to read attribute frompublic void write(WriteBuffer buffer, V attribute)
AttributeSerializer
It is expected that this write operation adjusts the position in the WriteBuffer to after the attribute value.
write
in interface AttributeSerializer<V>
buffer
- WriteBuffer to write attribute toattribute
- Attribute to write to WriteBufferpublic void verifyAttribute(V value)
AttributeSerializer
IllegalArgumentException
if the value is invalid,
otherwise simply returns.verifyAttribute
in interface AttributeSerializer<V>
value
- to verifypublic V convert(Object value)
AttributeSerializer
IllegalArgumentException
if it cannot be converted.convert
in interface AttributeSerializer<V>
value
- to convertCopyright © 2012–2020. All rights reserved.