me.prettyprint.cassandra.serializers
Class BigDecimalSerializer

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

public final class BigDecimalSerializer
extends AbstractSerializer<BigDecimal>

Serializer implementation for BigDecimal

Author:
peter lin

Constructor Summary
BigDecimalSerializer()
           
 
Method Summary
 BigDecimal fromByteBuffer(ByteBuffer byteBuffer)
          Extract an object of type T from the bytes.
static BigDecimalSerializer get()
           
 ComparatorType getComparatorType()
           
 byte[] toByteArray(BigDecimal bigDecimal)
           
 ByteBuffer toByteBuffer(BigDecimal obj)
          Extract bytes from the obj of type T
 byte[] toBytes(BigDecimal obj)
           
 
Methods inherited from class me.prettyprint.cassandra.serializers.AbstractSerializer
computeInitialHashSize, fromBytes, fromBytesList, fromBytesMap, fromBytesSet, toBytesList, toBytesMap, toBytesSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BigDecimalSerializer

public BigDecimalSerializer()
Method Detail

get

public static BigDecimalSerializer get()

toBytes

public byte[] toBytes(BigDecimal obj)
Specified by:
toBytes in interface Serializer<BigDecimal>
Overrides:
toBytes in class AbstractSerializer<BigDecimal>

fromByteBuffer

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

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

toByteBuffer

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

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

toByteArray

public byte[] toByteArray(BigDecimal bigDecimal)

getComparatorType

public ComparatorType getComparatorType()
Specified by:
getComparatorType in interface Serializer<BigDecimal>
Overrides:
getComparatorType in class AbstractSerializer<BigDecimal>


Copyright © 2013. All Rights Reserved.