com.thinkaurelius.titan.graphdb.database.serialize.attribute

## Class FloatSerializer

- java.lang.Object
- - com.thinkaurelius.titan.graphdb.database.serialize.attribute.FloatSerializer

- All Implemented Interfaces:
    AttributeHandler<Float>, AttributeSerializer<Float>

      public class FloatSerializer
      extends Object
      implements AttributeSerializer<Float>

  Author:
    Matthias Broecheler (me@matthiasb.com)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FloatSerializer()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Float` | `convert(Object value)` Converts the given (not-null) value to the expected datatype V.
    `Float` | `read(ScanBuffer buffer)` Reads an attribute from the given ReadBuffer.
    `void` | `verifyAttribute(Float value)` Verifies the given (not-null) attribute value is valid.
    `void` | `write(WriteBuffer buffer, Float attribute)` Writes the attribute value to the given WriteBuffer.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FloatSerializer

          public FloatSerializer()

  - ### Method Detail

    - #### verifyAttribute

          public void verifyAttribute(Float value)

      Description copied from interface: `AttributeHandler`
      Verifies the given (not-null) attribute value is valid. Throws an `IllegalArgumentException` if the value is invalid, otherwise simply returns.
      Specified by:
        `verifyAttribute` in interface `AttributeHandler<Float>`
      Parameters:
        `value` - to verify

    - #### convert

          public Float convert(Object value)

      Description copied from interface: `AttributeHandler`
      Converts the given (not-null) value to the expected datatype V. The given object will NOT be of type V. Throws an `IllegalArgumentException` if it cannot be converted.
      Specified by:
        `convert` in interface `AttributeHandler<Float>`
      Parameters:
        `value` - to convert
      Returns:
        converted to expected datatype

    - #### read

          public Float read(ScanBuffer buffer)

      Description copied from interface: `AttributeSerializer`
      Reads an attribute from the given ReadBuffer.

      It is expected that this read operation adjusts the position in the ReadBuffer to after the attribute value.
      Specified by:
        `read` in interface `AttributeSerializer<Float>`
      Parameters:
        `buffer` - ReadBuffer to read attribute from
      Returns:
        Read attribute

    - #### write

          public void write(WriteBuffer buffer,
                   Float attribute)

      Description copied from interface: `AttributeSerializer`
      Writes the attribute value to the given WriteBuffer.

      It is expected that this write operation adjusts the position in the WriteBuffer to after the attribute value.
      Specified by:
        `write` in interface `AttributeSerializer<Float>`
      Parameters:
        `buffer` - WriteBuffer to write attribute to
        `attribute` - Attribute to write to WriteBuffer

Copyright © 2012–2014. All rights reserved.