|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.scijava.Priority
public final class Priority
Constants for specifying an item's priority.
Prioritized.getPriority(),
Plugin.priority()| Field Summary | |
|---|---|
static double |
FIRST_PRIORITY
Priority for items that must be sorted first. |
static double |
HIGH_PRIORITY
Priority for items that prefer to be sorted earlier. |
static double |
LAST_PRIORITY
Priority for items that must be sorted last. |
static double |
LOW_PRIORITY
Priority for items that prefer to be sorted later. |
static double |
NORMAL_PRIORITY
Default priority for items. |
static double |
VERY_HIGH_PRIORITY
Priority for items that strongly prefer to be sorted early. |
static double |
VERY_LOW_PRIORITY
Priority for items that strongly prefer to be sorted late. |
| Method Summary | |
|---|---|
static int |
compare(Prioritized p1,
Prioritized p2)
Compares two Prioritized objects. |
static boolean |
inject(Object o,
double priority)
Injects the specified priority into the given object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final double FIRST_PRIORITY
public static final double VERY_HIGH_PRIORITY
public static final double HIGH_PRIORITY
public static final double NORMAL_PRIORITY
public static final double LOW_PRIORITY
public static final double VERY_LOW_PRIORITY
public static final double LAST_PRIORITY
| Method Detail |
|---|
public static int compare(Prioritized p1,
Prioritized p2)
Prioritized objects.
Note: this method provides a natural ordering that may be inconsistent with
equals. That is, two unequal objects may often have the same priority, and
thus return 0 when compared in this fashion. Hence, if this method is used
as a basis for implementing Comparable.compareTo(T) or
Comparator.compare(T, T), that implementation may want to
impose logic beyond that of this method, for breaking ties, if a total
ordering consistent with equals is always required.
p1's priority is higher than p2's, 1 if
p2's priority is higher than p1's, or 0 if they
have the same priority.ClassUtils.compare(Class, Class)
public static boolean inject(Object o,
double priority)
Prioritized
interface.
o - The object to which the priority should be assigned.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||