@Public public class BasicTypeInfo<T> extends TypeInformation<T> implements AtomicType<T>
Modifier and Type | Field and Description |
---|---|
static BasicTypeInfo<BigDecimal> |
BIG_DEC_TYPE_INFO |
static BasicTypeInfo<BigInteger> |
BIG_INT_TYPE_INFO |
static BasicTypeInfo<Boolean> |
BOOLEAN_TYPE_INFO |
static BasicTypeInfo<Byte> |
BYTE_TYPE_INFO |
static BasicTypeInfo<Character> |
CHAR_TYPE_INFO |
static BasicTypeInfo<Date> |
DATE_TYPE_INFO |
static BasicTypeInfo<Double> |
DOUBLE_TYPE_INFO |
static BasicTypeInfo<Float> |
FLOAT_TYPE_INFO |
static BasicTypeInfo<Instant> |
INSTANT_TYPE_INFO |
static BasicTypeInfo<Integer> |
INT_TYPE_INFO |
static BasicTypeInfo<Long> |
LONG_TYPE_INFO |
static BasicTypeInfo<Short> |
SHORT_TYPE_INFO |
static BasicTypeInfo<String> |
STRING_TYPE_INFO |
static BasicTypeInfo<Void> |
VOID_TYPE_INFO |
Modifier | Constructor and Description |
---|---|
protected |
BasicTypeInfo(Class<T> clazz,
Class<?>[] possibleCastTargetTypes,
TypeSerializer<T> serializer,
Class<? extends TypeComparator<T>> comparatorClass) |
Modifier and Type | Method and Description |
---|---|
boolean |
canEqual(Object obj)
Returns true if the given object can be equaled with this object.
|
TypeComparator<T> |
createComparator(boolean sortOrderAscending,
ExecutionConfig executionConfig)
Creates a comparator for this type.
|
TypeSerializer<T> |
createSerializer(ExecutionConfig config)
Deprecated.
|
TypeSerializer<T> |
createSerializer(SerializerConfig serializerConfig)
Creates a serializer for the type.
|
boolean |
equals(Object obj) |
int |
getArity()
Gets the arity of this type - the number of fields without nesting.
|
static <X> BasicTypeInfo<X> |
getInfoFor(Class<X> type) |
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.
|
boolean |
shouldAutocastTo(BasicTypeInfo<?> to)
Returns whether this type should be automatically casted to the target type in an arithmetic
operation.
|
String |
toString() |
getGenericParameters, isSortKeyType, of, of
public static final BasicTypeInfo<String> STRING_TYPE_INFO
public static final BasicTypeInfo<Boolean> BOOLEAN_TYPE_INFO
public static final BasicTypeInfo<Byte> BYTE_TYPE_INFO
public static final BasicTypeInfo<Short> SHORT_TYPE_INFO
public static final BasicTypeInfo<Integer> INT_TYPE_INFO
public static final BasicTypeInfo<Long> LONG_TYPE_INFO
public static final BasicTypeInfo<Float> FLOAT_TYPE_INFO
public static final BasicTypeInfo<Double> DOUBLE_TYPE_INFO
public static final BasicTypeInfo<Character> CHAR_TYPE_INFO
public static final BasicTypeInfo<Date> DATE_TYPE_INFO
public static final BasicTypeInfo<Void> VOID_TYPE_INFO
public static final BasicTypeInfo<BigInteger> BIG_INT_TYPE_INFO
public static final BasicTypeInfo<BigDecimal> BIG_DEC_TYPE_INFO
public static final BasicTypeInfo<Instant> INSTANT_TYPE_INFO
protected BasicTypeInfo(Class<T> clazz, Class<?>[] possibleCastTargetTypes, TypeSerializer<T> serializer, Class<? extends TypeComparator<T>> comparatorClass)
@PublicEvolving public boolean shouldAutocastTo(BasicTypeInfo<?> to)
@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.@Deprecated @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 TypeComparator<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.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 relationpublic boolean equals(Object obj)
equals
in class TypeInformation<T>
public String toString()
toString
in class TypeInformation<T>
@PublicEvolving public static <X> BasicTypeInfo<X> getInfoFor(Class<X> type)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.