Class StateUtilities.DescendingComparator<T extends Comparable>
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.states.StateUtilities.DescendingComparator<T>
-
- All Implemented Interfaces:
Serializable
,Comparator<T>
- Enclosing class:
- StateUtilities
public static final class StateUtilities.DescendingComparator<T extends Comparable> extends Object implements Comparator<T>, Serializable
A comparator for levels in descending order.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DescendingComparator()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(T c1, T c2)
Compares its two arguments for order.-
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
-
-
-
-
Method Detail
-
compare
public int compare(T c1, T c2)
Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.- Specified by:
compare
in interfaceComparator<T extends Comparable>
- Parameters:
c1
- the first object to be compared.c2
- the second object to be compared.- Returns:
- a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
- Throws:
ClassCastException
- if the arguments' types prevent them from being compared by this Comparator.
-
-