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() |
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, format, getCustomTypeClassName, getName, getTypeArguments, inet, isCollection, list, map, parse, serialize, serializeValue, 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.Copyright © 2014. All rights reserved.