public class TimeIntervalTypeInfo<T> extends TypeInformation<T> implements AtomicType<T>
Constructor and Description |
---|
TimeIntervalTypeInfo(Class<T> clazz,
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.
|
Class<T> |
clazz() |
Object |
comparatorClass() |
TypeComparator<T> |
createComparator(boolean sortOrderAscending,
ExecutionConfig executionConfig)
Creates a comparator for this type.
|
TypeSerializer<T> |
createSerializer(ExecutionConfig config)
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 Map<String,TypeInformation<?>> |
getGenericParameters() |
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() |
static TimeIntervalTypeInfo<Long> |
INTERVAL_MILLIS() |
static TimeIntervalTypeInfo<Integer> |
INTERVAL_MONTHS() |
boolean |
isBasicType()
Checks if this type information represents a basic type.
|
boolean |
isKeyType()
Checks whether this type can be used as a key.
|
static boolean |
isSortKeyType() |
boolean |
isTupleType()
Checks if this type information represents a Tuple type.
|
TypeSerializer<T> |
serializer() |
String |
toString() |
getGenericParameters, isSortKeyType, of, of
public TimeIntervalTypeInfo(Class<T> clazz, TypeSerializer<T> serializer, Class<? extends TypeComparator<T>> comparatorClass)
public static TimeIntervalTypeInfo<Integer> INTERVAL_MONTHS()
public static TimeIntervalTypeInfo<Long> INTERVAL_MILLIS()
public static Map<String,TypeInformation<?>> getGenericParameters()
public static boolean isSortKeyType()
public TypeSerializer<T> serializer()
public Object comparatorClass()
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 int getArity()
TypeInformation
getArity
in class TypeInformation<T>
public int getTotalFields()
TypeInformation
getTotalFields
in class TypeInformation<T>
public Class<T> getTypeClass()
TypeInformation
getTypeClass
in class TypeInformation<T>
public boolean isKeyType()
TypeInformation
isKeyType
in class TypeInformation<T>
public TypeSerializer<T> createSerializer(ExecutionConfig config)
TypeInformation
createSerializer
in class TypeInformation<T>
config
- The config used to parameterize the serializer.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 parameterized. Parameterization
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>
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.