public interface Ordered
Orderedis an interface that can be implemented by objects that should be orderable, for example in a
order can be interpreted as prioritization,
with the first object (with the lowest order value) having the highest
Note that there is also a priority marker for this interface:
PriorityOrdered. Order values expressed by
objects always apply before same order values expressed by plain
Consult the Javadoc for
OrderComparator for details on the
sort semantics for non-ordered objects.
|Modifier and Type||Field and Description|
Useful constant for the highest precedence value.
Useful constant for the lowest precedence value.
|Modifier and Type||Method and Description|
Get the order value of this object.
static final int HIGHEST_PRECEDENCE
Integer.MIN_VALUE, Constant Field Values
static final int LOWEST_PRECEDENCE
Integer.MAX_VALUE, Constant Field Values
Higher values are interpreted as lower priority. As a consequence,
the object with the lowest value has the highest priority (somewhat
analogous to Servlet
Same order values will result in arbitrary sort positions for the affected objects.