T
- The type of the class represented by this type information.@Public public class ValueTypeInfo<T extends Value> extends TypeInformation<T> implements AtomicType<T>
Value
interface. The value interface
allows types to define their custom serialization and deserialization routines.Modifier and Type | Field and Description |
---|---|
static ValueTypeInfo<BooleanValue> |
BOOLEAN_VALUE_TYPE_INFO |
static ValueTypeInfo<ByteValue> |
BYTE_VALUE_TYPE_INFO |
static ValueTypeInfo<CharValue> |
CHAR_VALUE_TYPE_INFO |
static ValueTypeInfo<DoubleValue> |
DOUBLE_VALUE_TYPE_INFO |
static ValueTypeInfo<FloatValue> |
FLOAT_VALUE_TYPE_INFO |
static ValueTypeInfo<IntValue> |
INT_VALUE_TYPE_INFO |
static ValueTypeInfo<LongValue> |
LONG_VALUE_TYPE_INFO |
static ValueTypeInfo<NullValue> |
NULL_VALUE_TYPE_INFO |
static ValueTypeInfo<ShortValue> |
SHORT_VALUE_TYPE_INFO |
static ValueTypeInfo<StringValue> |
STRING_VALUE_TYPE_INFO |
Constructor and Description |
---|
ValueTypeInfo(Class<T> type) |
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 executionConfig)
Creates a serializer for the type.
|
boolean |
equals(Object obj) |
int |
getArity()
Gets the arity of this type - the number of fields without nesting.
|
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 |
isBasicValueType() |
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 ValueTypeInfo<BooleanValue> BOOLEAN_VALUE_TYPE_INFO
public static final ValueTypeInfo<ByteValue> BYTE_VALUE_TYPE_INFO
public static final ValueTypeInfo<CharValue> CHAR_VALUE_TYPE_INFO
public static final ValueTypeInfo<DoubleValue> DOUBLE_VALUE_TYPE_INFO
public static final ValueTypeInfo<FloatValue> FLOAT_VALUE_TYPE_INFO
public static final ValueTypeInfo<IntValue> INT_VALUE_TYPE_INFO
public static final ValueTypeInfo<LongValue> LONG_VALUE_TYPE_INFO
public static final ValueTypeInfo<NullValue> NULL_VALUE_TYPE_INFO
public static final ValueTypeInfo<ShortValue> SHORT_VALUE_TYPE_INFO
public static final ValueTypeInfo<StringValue> STRING_VALUE_TYPE_INFO
@PublicEvolving public ValueTypeInfo(Class<T> type)
@PublicEvolving public int getArity()
TypeInformation
getArity
in class TypeInformation<T extends Value>
@PublicEvolving public int getTotalFields()
TypeInformation
The total number of fields must be at least 1.
getTotalFields
in class TypeInformation<T extends Value>
@PublicEvolving public Class<T> getTypeClass()
TypeInformation
getTypeClass
in class TypeInformation<T extends Value>
@PublicEvolving public boolean isBasicType()
TypeInformation
BasicTypeInfo
and are primitives, their boxing types, Strings, Date, Void, ...isBasicType
in class TypeInformation<T extends Value>
@PublicEvolving public boolean isBasicValueType()
@PublicEvolving public boolean isTupleType()
TypeInformation
isTupleType
in class TypeInformation<T extends Value>
@PublicEvolving public boolean isKeyType()
TypeInformation
isKeyType
in class TypeInformation<T extends Value>
@PublicEvolving public TypeSerializer<T> createSerializer(ExecutionConfig executionConfig)
TypeInformation
createSerializer
in class TypeInformation<T extends Value>
executionConfig
- The config used to parameterize the serializer.@PublicEvolving public TypeComparator<T> createComparator(boolean sortOrderAscending, ExecutionConfig executionConfig)
AtomicType
createComparator
in interface AtomicType<T extends Value>
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 extends Value>
public boolean equals(Object obj)
equals
in class TypeInformation<T extends Value>
public boolean canEqual(Object obj)
TypeInformation
canEqual
in class TypeInformation<T extends Value>
obj
- Object which wants to take part in the equality relationpublic String toString()
toString
in class TypeInformation<T extends Value>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.