public class ListType<T> extends CollectionType<java.util.List<T>>
CollectionType.Kind
Modifier and Type | Field and Description |
---|---|
ListSerializer<T> |
serializer |
kind, MAX_ELEMENTS
reverseComparator
Modifier and Type | Method and Description |
---|---|
int |
compare(java.nio.ByteBuffer o1,
java.nio.ByteBuffer o2) |
AbstractType<?> |
freeze() |
Term |
fromJSONObject(java.lang.Object parsed)
Given a parsed JSON string, return a byte representation of the object.
|
AbstractType<T> |
getElementsType() |
static <T> ListType<T> |
getInstance(AbstractType<T> elements,
boolean isMultiCell) |
static ListType<?> |
getInstance(TypeParser parser) |
ListSerializer<T> |
getSerializer() |
boolean |
isCompatibleWithFrozen(CollectionType<?> previous)
A version of isCompatibleWith() to deal with non-multicell (frozen) collections
|
boolean |
isMultiCell() |
boolean |
isValueCompatibleWithFrozen(CollectionType<?> previous)
A version of isValueCompatibleWith() to deal with non-multicell (frozen) collections
|
AbstractType<java.util.UUID> |
nameComparator() |
boolean |
references(AbstractType<?> check)
Checks whether this type or any of the types this type contains references the given type.
|
java.util.List<java.nio.ByteBuffer> |
serializedValues(java.util.List<Cell> cells) |
static java.lang.String |
setOrListToJsonString(java.nio.ByteBuffer buffer,
AbstractType elementsType,
int protocolVersion) |
java.lang.String |
toJSONString(java.nio.ByteBuffer buffer,
int protocolVersion)
Converts the specified value into its JSON representation.
|
java.lang.String |
toString(boolean ignoreFreezing) |
AbstractType<T> |
valueComparator() |
asCQL3Type, enforceLimit, fromString, getString, isCollection, isCompatibleWith, isMap, isValueCompatibleWithInternal, makeCollectionReceiver, serializeForNativeProtocol, toString, validateCellValue
asCQLTypeStringList, compareCollectionMembers, componentsCount, compose, decompose, getComponents, getString, isByteOrderComparable, isCounter, isEmptyValueMeaningless, isFrozenCollection, isReversed, isValueCompatibleWith, parseDefaultParameters, validate, validateCollectionMember
public final ListSerializer<T> serializer
public static ListType<?> getInstance(TypeParser parser) throws ConfigurationException, SyntaxException
public static <T> ListType<T> getInstance(AbstractType<T> elements, boolean isMultiCell)
public boolean references(AbstractType<?> check)
AbstractType
references
in class AbstractType<java.util.List<T>>
public AbstractType<T> getElementsType()
public AbstractType<java.util.UUID> nameComparator()
nameComparator
in class CollectionType<java.util.List<T>>
public AbstractType<T> valueComparator()
valueComparator
in class CollectionType<java.util.List<T>>
public ListSerializer<T> getSerializer()
getSerializer
in class CollectionType<java.util.List<T>>
public AbstractType<?> freeze()
freeze
in class AbstractType<java.util.List<T>>
public boolean isMultiCell()
isMultiCell
in class AbstractType<java.util.List<T>>
public boolean isCompatibleWithFrozen(CollectionType<?> previous)
CollectionType
isCompatibleWithFrozen
in class CollectionType<java.util.List<T>>
public boolean isValueCompatibleWithFrozen(CollectionType<?> previous)
CollectionType
isValueCompatibleWithFrozen
in class CollectionType<java.util.List<T>>
public int compare(java.nio.ByteBuffer o1, java.nio.ByteBuffer o2)
public java.lang.String toString(boolean ignoreFreezing)
toString
in class AbstractType<java.util.List<T>>
ignoreFreezing
- if true, the type string will not be wrapped with FrozenType(...), even if this type is frozen.public java.util.List<java.nio.ByteBuffer> serializedValues(java.util.List<Cell> cells)
serializedValues
in class CollectionType<java.util.List<T>>
public Term fromJSONObject(java.lang.Object parsed) throws MarshalException
AbstractType
fromJSONObject
in class AbstractType<java.util.List<T>>
parsed
- the result of parsing a json stringMarshalException
public static java.lang.String setOrListToJsonString(java.nio.ByteBuffer buffer, AbstractType elementsType, int protocolVersion)
public java.lang.String toJSONString(java.nio.ByteBuffer buffer, int protocolVersion)
AbstractType
The buffer position will stay the same.
toJSONString
in class AbstractType<java.util.List<T>>
buffer
- the value to convertprotocolVersion
- the protocol version to use for the conversionCopyright © 2020 The Apache Software Foundation