Class DelegatingComparator
java.lang.Object
com.atlassian.jira.issue.comparator.util.DelegatingComparator
- All Implemented Interfaces:
Comparator
-
Constructor Summary
ConstructorsConstructorDescriptionDelegatingComparator
(Comparator comparator1, Comparator comparator2) Constructs an instace of this comparator setting the first (top-priority) comparator and second (lower-priority) comparator. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
DelegatingComparator
Constructs an instace of this comparator setting the first (top-priority) comparator and second (lower-priority) comparator.- Parameters:
comparator1
- comparatorcomparator2
- comparator
-
-
Method Details
-
compare
Compares two given objects. Usescomparator1
first and returns the result of comparison if not 0. In case of 0, it continues and returns the result of comparison usingcomparator2
.- Specified by:
compare
in interfaceComparator
- Parameters:
o1
- object to compareo2
- object to compare- Returns:
- result of comparison
-