@groovy.transform.CompileStatic class OrderedComparator<T> extends java.lang.Object implements java.util.Comparator<T>
Support class for ordering objects that implement Ordered
Modifiers | Name | Description |
---|---|---|
static int |
HIGHEST_PRECEDENCE |
Useful constant for the highest precedence value. |
static int |
LOWEST_PRECEDENCE |
Useful constant for the lowest precedence value. |
Constructor and description |
---|
OrderedComparator
() |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Useful constant for the highest precedence value.
Useful constant for the lowest precedence value.
Find an order value indicated by the given object.
The default implementation checks against the Ordered trait. Can be overridden in subclasses.
obj
- the object to checknull
if none foundDetermine the order value for the given object.
obj
- the object to checkOrdered.LOWEST_PRECEDENCE
as fallback