public class ReversedType<T> extends AbstractType<T>
Modifier and Type | Field and Description |
---|---|
AbstractType<T> |
baseType |
reverseComparator
Modifier and Type | Method and Description |
---|---|
CQL3Type |
asCQL3Type() |
int |
compare(java.nio.ByteBuffer o1,
java.nio.ByteBuffer o2) |
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 <T> ReversedType<T> |
getInstance(AbstractType<T> baseType) |
static <T> ReversedType<T> |
getInstance(TypeParser parser) |
TypeSerializer<T> |
getSerializer() |
java.lang.String |
getString(java.nio.ByteBuffer bytes)
get a string representation of the bytes suitable for log messages
|
boolean |
isCompatibleWith(AbstractType<?> otherType)
Returns true if this comparator is compatible with the provided
previous comparator, that is if previous can safely be replaced by this.
|
boolean |
isEmptyValueMeaningless()
|
boolean |
isReversed() |
boolean |
isValueCompatibleWith(AbstractType<?> otherType)
Returns true if values of the other AbstractType can be read and "reasonably" interpreted by the this
AbstractType.
|
boolean |
references(AbstractType<?> check)
Checks whether this type or any of the types this type contains references the given type.
|
java.lang.String |
toJSONString(java.nio.ByteBuffer buffer,
int protocolVersion)
Converts the specified value into its JSON representation.
|
java.lang.String |
toString()
This must be overriden by subclasses if necessary so that for any
AbstractType, this == TypeParser.parse(toString()).
|
asCQLTypeStringList, compareCollectionMembers, componentsCount, compose, decompose, freeze, getComponents, getString, isByteOrderComparable, isCollection, isCounter, isFrozenCollection, isMultiCell, isValueCompatibleWithInternal, parseDefaultParameters, toString, validate, validateCellValue, validateCollectionMember
public final AbstractType<T> baseType
public static <T> ReversedType<T> getInstance(TypeParser parser) throws ConfigurationException, SyntaxException
public static <T> ReversedType<T> getInstance(AbstractType<T> baseType)
public boolean isEmptyValueMeaningless()
AbstractType
isEmptyValueMeaningless
in class AbstractType<T>
public int compare(java.nio.ByteBuffer o1, java.nio.ByteBuffer o2)
public java.lang.String getString(java.nio.ByteBuffer bytes)
AbstractType
getString
in class AbstractType<T>
public java.nio.ByteBuffer fromString(java.lang.String source)
AbstractType
fromString
in class AbstractType<T>
public Term fromJSONObject(java.lang.Object parsed) throws MarshalException
AbstractType
fromJSONObject
in class AbstractType<T>
parsed
- the result of parsing a json stringMarshalException
public java.lang.String toJSONString(java.nio.ByteBuffer buffer, int protocolVersion)
AbstractType
The buffer position will stay the same.
toJSONString
in class AbstractType<T>
buffer
- the value to convertprotocolVersion
- the protocol version to use for the conversionpublic boolean isCompatibleWith(AbstractType<?> otherType)
AbstractType
isCompatibleWith
in class AbstractType<T>
public boolean isValueCompatibleWith(AbstractType<?> otherType)
AbstractType
isValueCompatibleWith
in class AbstractType<T>
public CQL3Type asCQL3Type()
asCQL3Type
in class AbstractType<T>
public TypeSerializer<T> getSerializer()
getSerializer
in class AbstractType<T>
public boolean references(AbstractType<?> check)
AbstractType
references
in class AbstractType<T>
public boolean isReversed()
isReversed
in class AbstractType<T>
public java.lang.String toString()
AbstractType
toString
in class AbstractType<T>
Copyright © 2018 The Apache Software Foundation