T
- The type represented by this type information, e.g., int[], double[], long[]@Public public class PrimitiveArrayTypeInfo<T> extends TypeInformation<T> implements AtomicType<T>
TypeInformation
for arrays of primitive types (int, long, double, ...). Supports the
creation of dedicated efficient serializers for these types.Modifier and Type | Field and Description |
---|---|
static PrimitiveArrayTypeInfo<boolean[]> |
BOOLEAN_PRIMITIVE_ARRAY_TYPE_INFO |
static PrimitiveArrayTypeInfo<byte[]> |
BYTE_PRIMITIVE_ARRAY_TYPE_INFO |
static PrimitiveArrayTypeInfo<char[]> |
CHAR_PRIMITIVE_ARRAY_TYPE_INFO |
static PrimitiveArrayTypeInfo<double[]> |
DOUBLE_PRIMITIVE_ARRAY_TYPE_INFO |
static PrimitiveArrayTypeInfo<float[]> |
FLOAT_PRIMITIVE_ARRAY_TYPE_INFO |
static PrimitiveArrayTypeInfo<int[]> |
INT_PRIMITIVE_ARRAY_TYPE_INFO |
static PrimitiveArrayTypeInfo<long[]> |
LONG_PRIMITIVE_ARRAY_TYPE_INFO |
static PrimitiveArrayTypeInfo<short[]> |
SHORT_PRIMITIVE_ARRAY_TYPE_INFO |
Modifier and Type | Method and Description |
---|---|
boolean |
canEqual(Object obj)
Returns true if the given object can be equaled with this object.
|
PrimitiveArrayComparator<T,?> |
createComparator(boolean sortOrderAscending,
ExecutionConfig executionConfig)
Creates a comparator for this type.
|
TypeSerializer<T> |
createSerializer(ExecutionConfig config)
Create
TypeSerializer for this type. |
TypeSerializer<T> |
createSerializer(SerializerConfig serializerConfig)
Creates a serializer for the type.
|
boolean |
equals(Object other) |
int |
getArity()
Gets the arity of this type - the number of fields without nesting.
|
Class<?> |
getComponentClass()
Gets the class that represents the component type.
|
TypeInformation<?> |
getComponentType()
Gets the type information of the component type.
|
static <X> PrimitiveArrayTypeInfo<X> |
getInfoFor(Class<X> type)
Tries to get the PrimitiveArrayTypeInfo for an array.
|
int |
getTotalFields()
Gets the number of logical fields in this type.
|
Class<T> |
getTypeClass()
Gets the class of the type represented by this type information.
|
int |
hashCode() |
boolean |
isBasicType()
Checks if this type information represents a basic type.
|
boolean |
isKeyType()
Checks whether this type can be used as a key.
|
boolean |
isTupleType()
Checks if this type information represents a Tuple type.
|
String |
toString() |
getGenericParameters, isSortKeyType, of, of
public static final PrimitiveArrayTypeInfo<boolean[]> BOOLEAN_PRIMITIVE_ARRAY_TYPE_INFO
public static final PrimitiveArrayTypeInfo<byte[]> BYTE_PRIMITIVE_ARRAY_TYPE_INFO
public static final PrimitiveArrayTypeInfo<short[]> SHORT_PRIMITIVE_ARRAY_TYPE_INFO
public static final PrimitiveArrayTypeInfo<int[]> INT_PRIMITIVE_ARRAY_TYPE_INFO
public static final PrimitiveArrayTypeInfo<long[]> LONG_PRIMITIVE_ARRAY_TYPE_INFO
public static final PrimitiveArrayTypeInfo<float[]> FLOAT_PRIMITIVE_ARRAY_TYPE_INFO
public static final PrimitiveArrayTypeInfo<double[]> DOUBLE_PRIMITIVE_ARRAY_TYPE_INFO
public static final PrimitiveArrayTypeInfo<char[]> CHAR_PRIMITIVE_ARRAY_TYPE_INFO
@PublicEvolving public boolean isBasicType()
TypeInformation
BasicTypeInfo
and are primitives, their boxing types, Strings, Date, Void, ...isBasicType
in class TypeInformation<T>
@PublicEvolving public boolean isTupleType()
TypeInformation
isTupleType
in class TypeInformation<T>
@PublicEvolving public int getArity()
TypeInformation
getArity
in class TypeInformation<T>
@PublicEvolving public int getTotalFields()
TypeInformation
The total number of fields must be at least 1.
getTotalFields
in class TypeInformation<T>
@PublicEvolving public Class<T> getTypeClass()
TypeInformation
getTypeClass
in class TypeInformation<T>
@PublicEvolving public boolean isKeyType()
TypeInformation
isKeyType
in class TypeInformation<T>
@PublicEvolving public TypeSerializer<T> createSerializer(SerializerConfig serializerConfig)
TypeInformation
createSerializer
in class TypeInformation<T>
serializerConfig
- The config used to parameterize the serializer.@PublicEvolving public TypeSerializer<T> createSerializer(ExecutionConfig config)
TypeInformation
TypeSerializer
for this type.createSerializer
in class TypeInformation<T>
config
- the configuration of this job execution@PublicEvolving public Class<?> getComponentClass()
@PublicEvolving public TypeInformation<?> getComponentType()
public String toString()
toString
in class TypeInformation<T>
public boolean equals(Object other)
equals
in class TypeInformation<T>
public int hashCode()
hashCode
in class TypeInformation<T>
public boolean canEqual(Object obj)
TypeInformation
canEqual
in class TypeInformation<T>
obj
- Object which wants to take part in the equality relation@PublicEvolving public static <X> PrimitiveArrayTypeInfo<X> getInfoFor(Class<X> type)
type
- The class of the array.InvalidTypesException
- Thrown, if the given class does not represent an array.@PublicEvolving public PrimitiveArrayComparator<T,?> createComparator(boolean sortOrderAscending, ExecutionConfig executionConfig)
AtomicType
createComparator
in interface AtomicType<T>
sortOrderAscending
- True, if the comparator should define the order to be ascending,
false, if the comparator should define the order to be descending.executionConfig
- The config from which the comparator will be parametrized.
Parametrization includes for example registration of class tags for frameworks like Kryo.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.