Class TupleTypeInfo<T extends Tuple>
- java.lang.Object
-
- org.apache.flink.api.common.typeinfo.TypeInformation<T>
-
- org.apache.flink.api.common.typeutils.CompositeType<T>
-
- org.apache.flink.api.java.typeutils.TupleTypeInfoBase<T>
-
- org.apache.flink.api.java.typeutils.TupleTypeInfo<T>
-
- Type Parameters:
T- The type of the tuple.
- All Implemented Interfaces:
Serializable
@Public public final class TupleTypeInfo<T extends Tuple> extends TupleTypeInfoBase<T>
ATypeInformationfor the tuple types of the Java API.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.flink.api.common.typeutils.CompositeType
CompositeType.FlatFieldDescriptor, CompositeType.InvalidFieldReferenceException, CompositeType.TypeComparatorBuilder<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected String[]fieldNames-
Fields inherited from class org.apache.flink.api.java.typeutils.TupleTypeInfoBase
types
-
-
Constructor Summary
Constructors Constructor Description TupleTypeInfo(Class<T> tupleType, TypeInformation<?>... types)TupleTypeInfo(TypeInformation<?>... types)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanEqual(Object obj)Returns true if the given object can be equaled with this object.TupleSerializer<T>createSerializer(ExecutionConfig executionConfig)Creates a serializer for the type.protected CompositeType.TypeComparatorBuilder<T>createTypeComparatorBuilder()booleanequals(Object obj)static <X extends Tuple>
TupleTypeInfo<X>getBasicAndBasicValueTupleTypeInfo(Class<?>... basicTypes)static <X extends Tuple>
TupleTypeInfo<X>getBasicTupleTypeInfo(Class<?>... basicTypes)intgetFieldIndex(String fieldName)Returns the field index of the composite field of the given name.String[]getFieldNames()Returns the names of the composite fields of this type.Map<String,TypeInformation<?>>getGenericParameters()Optional method for giving Flink's type extraction system information about the mapping of a generic type parameter to the type information of a subtype.inthashCode()StringtoString()-
Methods inherited from class org.apache.flink.api.java.typeutils.TupleTypeInfoBase
getArity, getFieldTypes, getFlatFields, getTotalFields, getTypeAt, getTypeAt, hasDeterministicFieldOrder, isBasicType, isCaseClass, isTupleType
-
Methods inherited from class org.apache.flink.api.common.typeutils.CompositeType
createComparator, getFlatFields, getTypeClass, hasField, isKeyType, isSortKeyType
-
Methods inherited from class org.apache.flink.api.common.typeinfo.TypeInformation
of, of
-
-
-
-
Field Detail
-
fieldNames
protected final String[] fieldNames
-
-
Constructor Detail
-
TupleTypeInfo
@PublicEvolving public TupleTypeInfo(TypeInformation<?>... types)
-
TupleTypeInfo
@PublicEvolving public TupleTypeInfo(Class<T> tupleType, TypeInformation<?>... types)
-
-
Method Detail
-
getFieldNames
@PublicEvolving public String[] getFieldNames()
Description copied from class:CompositeTypeReturns the names of the composite fields of this type. The order of the returned array must be consistent with the internal field index ordering.- Specified by:
getFieldNamesin classCompositeType<T extends Tuple>
-
getFieldIndex
@PublicEvolving public int getFieldIndex(String fieldName)
Description copied from class:CompositeTypeReturns the field index of the composite field of the given name.- Specified by:
getFieldIndexin classCompositeType<T extends Tuple>- Returns:
- The field index or -1 if this type does not have a field of the given name.
-
createSerializer
@PublicEvolving public TupleSerializer<T> createSerializer(ExecutionConfig executionConfig)
Description copied from class:TypeInformationCreates a serializer for the type. The serializer may use the ExecutionConfig for parameterization.- Specified by:
createSerializerin classTypeInformation<T extends Tuple>- Parameters:
executionConfig- The config used to parameterize the serializer.- Returns:
- A serializer for this type.
-
createTypeComparatorBuilder
protected CompositeType.TypeComparatorBuilder<T> createTypeComparatorBuilder()
- Specified by:
createTypeComparatorBuilderin classCompositeType<T extends Tuple>
-
getGenericParameters
public Map<String,TypeInformation<?>> getGenericParameters()
Description copied from class:TypeInformationOptional method for giving Flink's type extraction system information about the mapping of a generic type parameter to the type information of a subtype. This information is necessary in cases where type information should be deduced from an input type.For instance, a method for a
Tuple2would look like this:Map m = new HashMap(); m.put("T0", this.getTypeAt(0)); m.put("T1", this.getTypeAt(1)); return m;- Overrides:
getGenericParametersin classTypeInformation<T extends Tuple>- Returns:
- map of inferred subtypes; it does not have to contain all generic parameters as key; values may be null if type could not be inferred
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classTupleTypeInfoBase<T extends Tuple>
-
canEqual
public boolean canEqual(Object obj)
Description copied from class:TypeInformationReturns true if the given object can be equaled with this object. If not, it returns false.- Overrides:
canEqualin classTupleTypeInfoBase<T extends Tuple>- Parameters:
obj- Object which wants to take part in the equality relation- Returns:
- true if obj can be equaled with this, otherwise false
-
hashCode
public int hashCode()
- Overrides:
hashCodein classTupleTypeInfoBase<T extends Tuple>
-
toString
public String toString()
- Overrides:
toStringin classTupleTypeInfoBase<T extends Tuple>
-
getBasicTupleTypeInfo
@PublicEvolving public static <X extends Tuple> TupleTypeInfo<X> getBasicTupleTypeInfo(Class<?>... basicTypes)
-
getBasicAndBasicValueTupleTypeInfo
@PublicEvolving public static <X extends Tuple> TupleTypeInfo<X> getBasicAndBasicValueTupleTypeInfo(Class<?>... basicTypes)
-
-