public class TupleType extends DataType
A tuple type is a essentially a list of types.
DataType.Name
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
List<DataType> |
getComponentTypes()
The (immutable) list of types composing this tuple type.
|
int |
hashCode() |
boolean |
isFrozen()
Returns whether this data type is frozen.
|
TupleValue |
newValue()
Returns a new empty value for this tuple type.
|
TupleValue |
newValue(Object... values)
Returns a new value for this tuple type that uses the provided values
for the components.
|
static TupleType |
of(DataType... types)
Creates a tuple type given a list of types.
|
String |
toString() |
allPrimitiveTypes, ascii, asJavaClass, bigint, blob, cboolean, cdouble, cfloat, cint, counter, custom, decimal, deserialize, deserialize, deserialize, format, frozenList, frozenMap, frozenSet, getCustomTypeClassName, getName, getTypeArguments, inet, isCollection, list, list, map, map, parse, serialize, serialize, serialize, serializeValue, serializeValue, serializeValue, set, set, text, timestamp, timeuuid, uuid, varchar, varint
public static TupleType of(DataType... types)
types
- the types for the tuple type.public List<DataType> getComponentTypes()
public TupleValue newValue()
null
) value for this
user type definition.public TupleValue newValue(Object... values)
The numbers of values passed to this method must correspond to the
number of components in this tuple type. The i
th parameter
value will then be assigned to the i
th component of the resulting
tuple value.
values
- the values to use for the component of the resulting
tuple.IllegalArgumentException
- if the number of values
provided does not correspond to the number of components in this tuple
type.InvalidTypeException
- if any of the provided value is not of
the correct type for the component.public boolean isFrozen()
DataType
This applies to User Defined Types, tuples and nested collections. Frozen types are serialized as a single value in Cassandra's storage engine, whereas non-frozen types are stored in a form that allows updates to individual subfields.
Copyright © 2012–2015. All rights reserved.