T1
- The class of the first data type.T2
- The class of the second data type.@Internal public abstract class TypePairComparator<T1,T2> extends Object
The class compares instances of two different data types. One is always used as the reference data type, and the other is checked against the reference. An instance of the reference data type is normally set as the reference for comparisons. Afterwards one or more instances of the other data type are checked against the reference.
Constructor and Description |
---|
TypePairComparator() |
Modifier and Type | Method and Description |
---|---|
abstract int |
compareToReference(T2 candidate) |
abstract boolean |
equalToReference(T2 candidate)
Checks, whether the given candidate instance is equal to the reference instance, with respect
to this comparator's equality definition.
|
abstract void |
setReference(T1 reference)
Sets the reference for comparisons.
|
public abstract void setReference(T1 reference)
reference
- The reference instance.public abstract boolean equalToReference(T2 candidate)
candidate
- The candidate to check.public abstract int compareToReference(T2 candidate)
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.