me.prettyprint.cassandra.serializers
Class UUIDSerializer

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

public final class UUIDSerializer
extends AbstractSerializer<UUID>

A UUIDSerializer translates the byte[] to and from UUID types.

Author:
Ed Anuff

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

Constructor Detail

UUIDSerializer

public UUIDSerializer()
Method Detail

get

public static UUIDSerializer get()

toByteBuffer

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

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

fromByteBuffer

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

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

getComparatorType

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


Copyright © 2011. All Rights Reserved.