Class GenericPairComparator<T1,T2>
- java.lang.Object
-
- org.apache.flink.api.common.typeutils.TypePairComparator<T1,T2>
-
- org.apache.flink.api.common.typeutils.GenericPairComparator<T1,T2>
-
- All Implemented Interfaces:
Serializable
@Internal public class GenericPairComparator<T1,T2> extends TypePairComparator<T1,T2> implements Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GenericPairComparator(TypeComparator<T1> comparator1, TypeComparator<T2> comparator2)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareToReference(T2 candidate)booleanequalToReference(T2 candidate)Checks, whether the given candidate instance is equal to the reference instance, with respect to this comparator's equality definition.voidsetReference(T1 reference)Sets the reference for comparisons.
-
-
-
Constructor Detail
-
GenericPairComparator
public GenericPairComparator(TypeComparator<T1> comparator1, TypeComparator<T2> comparator2)
-
-
Method Detail
-
setReference
public void setReference(T1 reference)
Description copied from class:TypePairComparatorSets the reference for comparisons.- Specified by:
setReferencein classTypePairComparator<T1,T2>- Parameters:
reference- The reference instance.
-
equalToReference
public boolean equalToReference(T2 candidate)
Description copied from class:TypePairComparatorChecks, whether the given candidate instance is equal to the reference instance, with respect to this comparator's equality definition.- Specified by:
equalToReferencein classTypePairComparator<T1,T2>- Parameters:
candidate- The candidate to check.- Returns:
- True, if the candidate is equal to the reference, false otherwise.
-
compareToReference
public int compareToReference(T2 candidate)
- Specified by:
compareToReferencein classTypePairComparator<T1,T2>
-
-