me.prettyprint.cassandra.serializers
Class FloatSerializer

java.lang.Object
  extended by me.prettyprint.cassandra.serializers.AbstractSerializer<Float>
      extended by me.prettyprint.cassandra.serializers.FloatSerializer
All Implemented Interfaces:
Serializer<Float>

public class FloatSerializer
extends AbstractSerializer<Float>

Uses IntSerializer via translating Float objects to and from raw long bytes form.

Author:
Todd Nine

Constructor Summary
FloatSerializer()
           
 
Method Summary
 Float fromByteBuffer(ByteBuffer bytes)
          Extract an object of type T from the bytes.
static FloatSerializer get()
           
 ByteBuffer toByteBuffer(Float obj)
          Extract bytes from the obj of type T
 
Methods inherited from class me.prettyprint.cassandra.serializers.AbstractSerializer
computeInitialHashSize, fromBytes, fromBytesList, fromBytesMap, fromBytesSet, getComparatorType, toBytes, toBytesList, toBytesMap, toBytesSet
 
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

get

public static FloatSerializer get()

toByteBuffer

public ByteBuffer toByteBuffer(Float obj)
Description copied from interface: Serializer
Extract bytes from the obj of type T

Specified by:
toByteBuffer in interface Serializer<Float>
Specified by:
toByteBuffer in class AbstractSerializer<Float>
Returns:

fromByteBuffer

public Float fromByteBuffer(ByteBuffer bytes)
Description copied from interface: Serializer
Extract an object of type T from the bytes.

Specified by:
fromByteBuffer in interface Serializer<Float>
Specified by:
fromByteBuffer in class AbstractSerializer<Float>
Returns:


Copyright © 2011. All Rights Reserved.