public abstract class CollectionType<T> extends AbstractType<T>
| Modifier and Type | Class and Description |
|---|---|
static class |
CollectionType.Kind |
| Modifier and Type | Field and Description |
|---|---|
CollectionType.Kind |
kind |
static int |
MAX_ELEMENTS |
reverseComparator| Modifier | Constructor and Description |
|---|---|
protected |
CollectionType(CollectionType.Kind kind) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
appendToStringBuilder(java.lang.StringBuilder sb) |
CQL3Type |
asCQL3Type() |
protected java.util.List<Cell> |
enforceLimit(java.util.List<Cell> cells,
int version) |
java.nio.ByteBuffer |
fromString(java.lang.String source)
get a byte representation of the given string.
|
abstract CollectionSerializer<T> |
getSerializer() |
java.lang.String |
getString(java.nio.ByteBuffer bytes)
get a string representation of the bytes suitable for log messages
|
boolean |
isCollection() |
boolean |
isCompatibleWith(AbstractType<?> previous)
Returns true if this comparator is compatible with the provided
previous comparator, that is if previous can safely be replaced by this.
|
boolean |
isMap()
Checks if this collection is Map.
|
abstract AbstractType<?> |
nameComparator() |
abstract java.util.List<java.nio.ByteBuffer> |
serializedValues(java.util.List<Cell> cells) |
java.nio.ByteBuffer |
serializeForNativeProtocol(java.util.List<Cell> cells,
int version) |
java.lang.String |
toString()
This must be overriden by subclasses if necessary so that for any
AbstractType, this == TypeParser.parse(toString()).
|
void |
validateCellValue(java.nio.ByteBuffer cellValue)
Validate cell value.
|
abstract AbstractType<?> |
valueComparator() |
compareCollectionMembers, componentsCount, compose, decompose, fromStringCQL2, getComponents, getString, isByteOrderComparable, isCounter, isValueCompatibleWith, isValueCompatibleWithInternal, parseDefaultParameters, validate, validateCollectionMemberpublic static final int MAX_ELEMENTS
public final CollectionType.Kind kind
protected CollectionType(CollectionType.Kind kind)
public abstract AbstractType<?> nameComparator()
public abstract AbstractType<?> valueComparator()
protected abstract void appendToStringBuilder(java.lang.StringBuilder sb)
public abstract java.util.List<java.nio.ByteBuffer> serializedValues(java.util.List<Cell> cells)
public abstract CollectionSerializer<T> getSerializer()
getSerializer in class AbstractType<T>public void validateCellValue(java.nio.ByteBuffer cellValue)
throws MarshalException
AbstractTypevalidateCellValue in class AbstractType<T>cellValue - ByteBuffer representing cell valueMarshalExceptionpublic java.lang.String toString()
AbstractTypetoString in class AbstractType<T>public java.lang.String getString(java.nio.ByteBuffer bytes)
AbstractTypegetString in class AbstractType<T>public java.nio.ByteBuffer fromString(java.lang.String source)
AbstractTypefromString in class AbstractType<T>public boolean isCompatibleWith(AbstractType<?> previous)
AbstractTypeisCompatibleWith in class AbstractType<T>public boolean isCollection()
isCollection in class AbstractType<T>public boolean isMap()
true if this collection is a Map, false otherwise.public java.nio.ByteBuffer serializeForNativeProtocol(java.util.List<Cell> cells, int version)
public CQL3Type asCQL3Type()
asCQL3Type in class AbstractType<T>Copyright © 2014 The Apache Software Foundation