org.apache.cassandra.db.marshal
Class SetType<T>
java.lang.Object
org.apache.cassandra.db.marshal.AbstractType<T>
org.apache.cassandra.db.marshal.CollectionType<java.util.Set<T>>
org.apache.cassandra.db.marshal.SetType<T>
- All Implemented Interfaces:
- java.util.Comparator<java.nio.ByteBuffer>
public class SetType<T>
- extends CollectionType<java.util.Set<T>>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
equals |
elements
public final AbstractType<T> elements
SetType
public SetType(AbstractType<T> elements)
getInstance
public static SetType<?> getInstance(TypeParser parser)
throws ConfigurationException,
SyntaxException
- Throws:
ConfigurationException
SyntaxException
getInstance
public static <T> SetType<T> getInstance(AbstractType<T> elements)
nameComparator
public AbstractType<T> nameComparator()
- Specified by:
nameComparator
in class CollectionType<java.util.Set<T>>
valueComparator
public AbstractType<?> valueComparator()
- Specified by:
valueComparator
in class CollectionType<java.util.Set<T>>
compose
public java.util.Set<T> compose(java.nio.ByteBuffer bytes)
- Specified by:
compose
in class AbstractType<java.util.Set<T>>
decompose
public java.nio.ByteBuffer decompose(java.util.Set<T> value)
- Layout is:
<n><s_1><b_1>...<s_n><b_n>
where:
n is the number of elements
s_i is the number of bytes composing the ith element
b_i is the s_i bytes composing the ith element
- Specified by:
decompose
in class AbstractType<java.util.Set<T>>
appendToStringBuilder
protected void appendToStringBuilder(java.lang.StringBuilder sb)
- Specified by:
appendToStringBuilder
in class CollectionType<java.util.Set<T>>
serialize
public java.nio.ByteBuffer serialize(java.util.List<Pair<java.nio.ByteBuffer,IColumn>> columns)
- Specified by:
serialize
in class CollectionType<java.util.Set<T>>
Copyright © 2013 The Apache Software Foundation