public abstract class TupleTypeInfoBase<T> extends CompositeType<T>
CompositeType.FlatFieldDescriptor, CompositeType.InvalidFieldReferenceException, CompositeType.TypeComparatorBuilder<T>
Modifier and Type | Field and Description |
---|---|
protected TypeInformation<?>[] |
types |
Constructor and Description |
---|
TupleTypeInfoBase(Class<T> tupleType,
TypeInformation<?>... types) |
Modifier and Type | Method and Description |
---|---|
boolean |
canEqual(Object obj)
Returns true if the given object can be equaled with this object.
|
boolean |
equals(Object obj) |
int |
getArity()
Gets the arity of this type - the number of fields without nesting.
|
TypeInformation<?>[] |
getFieldTypes()
Returns the field types.
|
void |
getFlatFields(String fieldExpression,
int offset,
List<CompositeType.FlatFieldDescriptor> result)
Computes the flat field descriptors for the given field expression with the given offset.
|
int |
getTotalFields()
Gets the number of logical fields in this type.
|
<X> TypeInformation<X> |
getTypeAt(int pos)
Returns the type of the (unnested) field at the given field position.
|
<X> TypeInformation<X> |
getTypeAt(String fieldExpression)
Returns the type of the (nested) field at the given field expression position.
|
boolean |
hasDeterministicFieldOrder()
True if this type has an inherent ordering of the fields, such that a user can always be sure
in which order the fields will be in.
|
int |
hashCode() |
boolean |
isBasicType()
Checks if this type information represents a basic type.
|
boolean |
isCaseClass() |
boolean |
isTupleType()
Checks if this type information represents a Tuple type.
|
String |
toString() |
createComparator, createTypeComparatorBuilder, getFieldIndex, getFieldNames, getFlatFields, getTypeClass, hasField, isKeyType, isSortKeyType
createSerializer, createSerializer, getGenericParameters, of, of
protected final TypeInformation<?>[] types
public TupleTypeInfoBase(Class<T> tupleType, TypeInformation<?>... types)
public boolean isBasicType()
TypeInformation
BasicTypeInfo
and are primitives, their boxing types, Strings, Date, Void, ...isBasicType
in class TypeInformation<T>
public boolean isTupleType()
TypeInformation
isTupleType
in class TypeInformation<T>
public boolean isCaseClass()
public int getArity()
TypeInformation
getArity
in class TypeInformation<T>
public TypeInformation<?>[] getFieldTypes()
public int getTotalFields()
TypeInformation
The total number of fields must be at least 1.
getTotalFields
in class TypeInformation<T>
public void getFlatFields(String fieldExpression, int offset, List<CompositeType.FlatFieldDescriptor> result)
CompositeType
getFlatFields
in class CompositeType<T>
fieldExpression
- The field expression for which the FlatFieldDescriptors are computed.offset
- The offset to use when computing the positions of the flat fields.result
- The list into which all flat field descriptors are inserted.public <X> TypeInformation<X> getTypeAt(String fieldExpression)
CompositeType
getTypeAt
in class CompositeType<T>
fieldExpression
- The field expression for which the field of which the type is
returned.public <X> TypeInformation<X> getTypeAt(int pos)
CompositeType
getTypeAt
in class CompositeType<T>
pos
- The position of the (unnested) field in this composite type.public boolean equals(Object obj)
equals
in class CompositeType<T>
public boolean canEqual(Object obj)
TypeInformation
canEqual
in class CompositeType<T>
obj
- Object which wants to take part in the equality relationpublic int hashCode()
hashCode
in class CompositeType<T>
public String toString()
toString
in class CompositeType<T>
public boolean hasDeterministicFieldOrder()
CompositeType
This is used when translating a DataSet or DataStream to an Expression Table, when initially renaming the fields of the underlying type.
hasDeterministicFieldOrder
in class CompositeType<T>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.