me.prettyprint.cassandra.serializers
Class DoubleSerializer

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

public class DoubleSerializer
extends AbstractSerializer<Double>

Uses LongSerializer via translating Doubles to and from raw long bytes form.

Author:
Yuri Finkelstein

Constructor Summary
DoubleSerializer()
           
 
Method Summary
 Double fromByteBuffer(ByteBuffer bytes)
          Extract an object of type T from the bytes.
static DoubleSerializer get()
           
 ByteBuffer toByteBuffer(Double 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

DoubleSerializer

public DoubleSerializer()
Method Detail

get

public static DoubleSerializer get()

toByteBuffer

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

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

fromByteBuffer

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

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


Copyright © 2011. All Rights Reserved.