public class TupleType extends AbstractType<java.nio.ByteBuffer>
AbstractType.ComparisonType| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<AbstractType<?>> |
types |
comparisonType, isByteOrderComparable, reverseComparator| Constructor and Description |
|---|
TupleType(java.util.List<AbstractType<?>> types) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<AbstractType<?>> |
allTypes() |
CQL3Type |
asCQL3Type() |
static java.nio.ByteBuffer |
buildValue(java.nio.ByteBuffer[] components) |
int |
compareCustom(java.nio.ByteBuffer o1,
java.nio.ByteBuffer o2)
Implement IFF ComparisonType is CUSTOM
Compares the ByteBuffer representation of two instances of this class,
for types where this cannot be done by simple in-order comparison of the
unsigned bytes
Standard Java compare semantics
|
boolean |
equals(java.lang.Object o) |
Term |
fromJSONObject(java.lang.Object parsed)
Given a parsed JSON string, return a byte representation of the object.
|
java.nio.ByteBuffer |
fromString(java.lang.String source)
get a byte representation of the given string.
|
static TupleType |
getInstance(TypeParser parser) |
TypeSerializer<java.nio.ByteBuffer> |
getSerializer() |
java.lang.String |
getString(java.nio.ByteBuffer value)
get a string representation of the bytes used for various identifier (NOT just for log messages)
|
int |
hashCode() |
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 |
isValueCompatibleWithInternal(AbstractType<?> otherType)
Needed to handle ReversedType in value-compatibility checks.
|
boolean |
referencesUserType(java.lang.String name) |
int |
size() |
java.nio.ByteBuffer[] |
split(java.nio.ByteBuffer value)
Split a tuple value into its component values.
|
java.lang.String |
toJSONString(java.nio.ByteBuffer buffer,
int protocolVersion)
Converts a value to a JSON string.
|
java.lang.String |
toString()
This must be overriden by subclasses if necessary so that for any
AbstractType, this == TypeParser.parse(toString()).
|
AbstractType<?> |
type(int i) |
void |
validate(java.nio.ByteBuffer bytes) |
asCQLTypeStringList, checkComparable, compare, compareCollectionMembers, compareForCQL, componentsCount, compose, decompose, freeze, getComponents, getString, isCollection, isCounter, isEmptyValueMeaningless, isFrozenCollection, isMultiCell, isReversed, isValueCompatibleWith, parseDefaultParameters, readValue, skipValue, toString, validateCellValue, validateCollectionMember, valueLengthIfFixed, writeValue, writtenLengthprotected final java.util.List<AbstractType<?>> types
public TupleType(java.util.List<AbstractType<?>> types)
public static TupleType getInstance(TypeParser parser) throws ConfigurationException, SyntaxException
public boolean referencesUserType(java.lang.String name)
referencesUserType in class AbstractType<java.nio.ByteBuffer>public AbstractType<?> type(int i)
public int size()
public java.util.List<AbstractType<?>> allTypes()
public int compareCustom(java.nio.ByteBuffer o1,
java.nio.ByteBuffer o2)
AbstractTypecompareCustom in class AbstractType<java.nio.ByteBuffer>public void validate(java.nio.ByteBuffer bytes)
throws MarshalException
validate in class AbstractType<java.nio.ByteBuffer>MarshalExceptionpublic java.nio.ByteBuffer[] split(java.nio.ByteBuffer value)
public static java.nio.ByteBuffer buildValue(java.nio.ByteBuffer[] components)
public java.lang.String getString(java.nio.ByteBuffer value)
AbstractTypegetString in class AbstractType<java.nio.ByteBuffer>public java.nio.ByteBuffer fromString(java.lang.String source)
AbstractTypefromString in class AbstractType<java.nio.ByteBuffer>public Term fromJSONObject(java.lang.Object parsed) throws MarshalException
AbstractTypefromJSONObject in class AbstractType<java.nio.ByteBuffer>parsed - the result of parsing a json stringMarshalExceptionpublic java.lang.String toJSONString(java.nio.ByteBuffer buffer,
int protocolVersion)
AbstractTypetoJSONString in class AbstractType<java.nio.ByteBuffer>public TypeSerializer<java.nio.ByteBuffer> getSerializer()
getSerializer in class AbstractType<java.nio.ByteBuffer>public boolean isCompatibleWith(AbstractType<?> previous)
AbstractTypeisCompatibleWith in class AbstractType<java.nio.ByteBuffer>public boolean isValueCompatibleWithInternal(AbstractType<?> otherType)
AbstractTypeisValueCompatibleWithInternal in class AbstractType<java.nio.ByteBuffer>public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in interface java.util.Comparator<java.nio.ByteBuffer>equals in class java.lang.Objectpublic CQL3Type asCQL3Type()
asCQL3Type in class AbstractType<java.nio.ByteBuffer>public java.lang.String toString()
AbstractTypetoString in class AbstractType<java.nio.ByteBuffer>Copyright © 2016 The Apache Software Foundation