public class ReversedType<T> extends AbstractType<T>
AbstractType.ComparisonTypeAssignmentTestable.TestResult| Modifier and Type | Field and Description |
|---|---|
AbstractType<T> |
baseType |
comparatorSet, comparisonType, isByteOrderComparable, reverseComparator| Modifier and Type | Method and Description |
|---|---|
CQL3Type |
asCQL3Type() |
<VL,VR> int |
compareCustom(VL left,
ValueAccessor<VL> accessorL,
VR right,
ValueAccessor<VR> accessorR)
Implement IFF ComparisonType is CUSTOM
Compares the byte 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
|
int |
compareForCQL(java.nio.ByteBuffer v1,
java.nio.ByteBuffer v2)
Same as compare except that this ignore ReversedType.
|
AbstractType<?> |
expandUserTypes()
Replace any instances of UserType with equivalent TupleType-s.
|
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() |
<V> java.lang.String |
getString(V value,
ValueAccessor<V> accessor)
get a string representation of the bytes used for various identifier (NOT just 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.
|
<V> boolean |
referencesUserType(V name,
ValueAccessor<V> accessor) |
java.lang.String |
toJSONString(java.nio.ByteBuffer buffer,
ProtocolVersion 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()).
|
int |
valueLengthIfFixed()
The length of values for this type if all values are of fixed length, -1 otherwise.
|
ReversedType<?> |
withUpdatedUserType(UserType udt)
Returns an instance of this type with all references to the provided user type recursively replaced with its new
definition.
|
asCQLTypeStringList, checkComparable, compare, compare, compareCollectionMembers, compose, compose, decompose, freeze, freezeNestedMulticellTypes, getComponents, getString, getString, isCollection, isCounter, isFreezable, isFrozenCollection, isMultiCell, isTuple, isUDT, isValueCompatibleWithInternal, parseDefaultParameters, read, readArray, readBuffer, readBuffer, referencesDuration, referencesUserType, skipValue, subTypes, testAssignment, testAssignment, toJSONString, toString, validate, validate, validateCellValue, validateCollectionMember, writeValue, writeValue, writtenLength, writtenLengthpublic final AbstractType<T> baseType
public static <T> ReversedType<T> getInstance(TypeParser parser)
public static <T> ReversedType<T> getInstance(AbstractType<T> baseType)
public boolean isEmptyValueMeaningless()
AbstractTypeisEmptyValueMeaningless in class AbstractType<T>public <VL,VR> int compareCustom(VL left,
ValueAccessor<VL> accessorL,
VR right,
ValueAccessor<VR> accessorR)
AbstractTypecompareCustom in class AbstractType<T>public int compareForCQL(java.nio.ByteBuffer v1,
java.nio.ByteBuffer v2)
AbstractTypecompareForCQL in class AbstractType<T>public <V> java.lang.String getString(V value,
ValueAccessor<V> accessor)
AbstractTypegetString in class AbstractType<T>public java.nio.ByteBuffer fromString(java.lang.String source)
AbstractTypefromString in class AbstractType<T>public Term fromJSONObject(java.lang.Object parsed) throws MarshalException
AbstractTypefromJSONObject in class AbstractType<T>parsed - the result of parsing a json stringMarshalExceptionpublic java.lang.String toJSONString(java.nio.ByteBuffer buffer,
ProtocolVersion protocolVersion)
AbstractTypeThe 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)
AbstractTypeisCompatibleWith in class AbstractType<T>public boolean isValueCompatibleWith(AbstractType<?> otherType)
AbstractTypeisValueCompatibleWith in class AbstractType<T>public CQL3Type asCQL3Type()
asCQL3Type in class AbstractType<T>public TypeSerializer<T> getSerializer()
getSerializer in class AbstractType<T>public <V> boolean referencesUserType(V name,
ValueAccessor<V> accessor)
referencesUserType in class AbstractType<T>public AbstractType<?> expandUserTypes()
AbstractTypeexpandUserTypes in class AbstractType<T>public ReversedType<?> withUpdatedUserType(UserType udt)
AbstractTypewithUpdatedUserType in class AbstractType<T>public int valueLengthIfFixed()
AbstractTypevalueLengthIfFixed in class AbstractType<T>public boolean isReversed()
isReversed in class AbstractType<T>public java.lang.String toString()
AbstractTypetoString in class AbstractType<T>Copyright © 2009-2020 The Apache Software Foundation