org.eclipse.actf.util.comparator
Class ChainComparator
java.lang.Object
org.eclipse.actf.util.comparator.ChainComparator
- All Implemented Interfaces:
- Comparator<Object>
public abstract class ChainComparator
- extends Object
- implements Comparator<Object>
Abstract class for implementing Comparator chain.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChainComparator
public ChainComparator()
setNext
public ChainComparator setNext(ChainComparator next)
- Set next Comparator.
- Parameters:
next
- the next Comparator
- Returns:
- the next Comparator
intResolve
public final int intResolve(int i1,
int i2)
- Return comparison result
- Parameters:
i1
- the target integer value 1i2
- the target integer value 2
- Returns:
- a negative integer, zero, or a positive integer as the first
argument is less than, equal to, or greater than the second.
resolve
protected abstract int resolve(Object o1,
Object o2)
- Implementations have to implement this method.
- Parameters:
o1
- the target Object 1o2
- the target Object 2
- Returns:
- a negative integer, zero, or a positive integer as the first
argument is less than, equal to, or greater than the second.
compare
public int compare(Object o1,
Object o2)
- Specified by:
compare
in interface Comparator<Object>