Class SameTypePairComparator<T>
- java.lang.Object
-
- org.apache.flink.api.common.typeutils.TypePairComparator<T,T>
-
- org.apache.flink.api.common.typeutils.SameTypePairComparator<T>
-
@Internal public class SameTypePairComparator<T> extends TypePairComparator<T,T>
-
-
Constructor Summary
Constructors Constructor Description SameTypePairComparator(TypeComparator<T> comp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareToReference(T candidate)
boolean
equalToReference(T candidate)
Checks, whether the given candidate instance is equal to the reference instance, with respect to this comparator's equality definition.void
setReference(T reference)
Sets the reference for comparisons.
-
-
-
Constructor Detail
-
SameTypePairComparator
public SameTypePairComparator(TypeComparator<T> comp)
-
-
Method Detail
-
setReference
public void setReference(T reference)
Description copied from class:TypePairComparator
Sets the reference for comparisons.- Specified by:
setReference
in classTypePairComparator<T,T>
- Parameters:
reference
- The reference instance.
-
equalToReference
public boolean equalToReference(T candidate)
Description copied from class:TypePairComparator
Checks, whether the given candidate instance is equal to the reference instance, with respect to this comparator's equality definition.- Specified by:
equalToReference
in classTypePairComparator<T,T>
- Parameters:
candidate
- The candidate to check.- Returns:
- True, if the candidate is equal to the reference, false otherwise.
-
compareToReference
public int compareToReference(T candidate)
- Specified by:
compareToReference
in classTypePairComparator<T,T>
-
-