L - the Left value typeR - the Right value type@Public public class EitherTypeInfo<L,R> extends TypeInformation<Either<L,R>>
TypeInformation for the Either type of the Java API.| Constructor and Description |
|---|
EitherTypeInfo(TypeInformation<L> leftType,
TypeInformation<R> rightType) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canEqual(Object obj)
Returns true if the given object can be equaled with this object.
|
TypeSerializer<Either<L,R>> |
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.
|
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.
|
TypeInformation<L> |
getLeftType() |
TypeInformation<R> |
getRightType() |
int |
getTotalFields()
Gets the number of logical fields in this type.
|
Class<Either<L,R>> |
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() |
isSortKeyType, of, of@PublicEvolving public EitherTypeInfo(TypeInformation<L> leftType, TypeInformation<R> rightType)
@PublicEvolving public boolean isBasicType()
TypeInformationBasicTypeInfo and are primitives, their boxing types,
Strings, Date, Void, ...isBasicType in class TypeInformation<Either<L,R>>@PublicEvolving public boolean isTupleType()
TypeInformationisTupleType in class TypeInformation<Either<L,R>>@PublicEvolving public int getArity()
TypeInformationgetArity in class TypeInformation<Either<L,R>>@PublicEvolving public int getTotalFields()
TypeInformationThe total number of fields must be at least 1.
getTotalFields in class TypeInformation<Either<L,R>>@PublicEvolving public Class<Either<L,R>> getTypeClass()
TypeInformationgetTypeClass in class TypeInformation<Either<L,R>>@PublicEvolving public Map<String,TypeInformation<?>> getGenericParameters()
TypeInformationFor instance, a method for a Tuple2 would look like this:
Map m = new HashMap();
m.put("T0", this.getTypeAt(0));
m.put("T1", this.getTypeAt(1));
return m;
getGenericParameters in class TypeInformation<Either<L,R>>@PublicEvolving public boolean isKeyType()
TypeInformationisKeyType in class TypeInformation<Either<L,R>>@PublicEvolving public TypeSerializer<Either<L,R>> createSerializer(ExecutionConfig config)
TypeInformationcreateSerializer in class TypeInformation<Either<L,R>>config - The config used to parameterize the serializer.public int hashCode()
hashCode in class TypeInformation<Either<L,R>>public boolean canEqual(Object obj)
TypeInformationcanEqual in class TypeInformation<Either<L,R>>obj - Object which wants to take part in the equality relationpublic TypeInformation<L> getLeftType()
public TypeInformation<R> getRightType()
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.