Package com.luciad.containers
Class Priority
java.lang.Object
com.luciad.containers.Priority
- All Implemented Interfaces:
Comparable<Priority>
Priority class that can be used in all kinds of classes.
For example in composites where it can be used to determine the order in which the delegates are used.
The binary operators that determine the ordering sort priorities from high to low.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Priority
Preset priority value that represents a fallback priority.static final Priority
Preset priority value that represents a high priority.static final Priority
Preset priority value that represents a low priority.static final Priority
Preset priority value that represents a default priority. -
Constructor Summary
-
Method Summary
-
Field Details
-
High
Preset priority value that represents a high priority.Its priority value is 5000. Priority order: High > Normal > Low > Fallback
-
Normal
Preset priority value that represents a default priority.Its priority value is 10000. Priority order: High > Normal > Low > Fallback
-
Low
Preset priority value that represents a low priority.Its priority value is 20000. Priority order: High > Normal > Low > Fallback
-
Fallback
Preset priority value that represents a fallback priority.Its priority value is 50000. Priority order: High > Normal > Low > Fallback
-
-
Constructor Details
-
Priority
public Priority(long value) Creates a new priority with the given value.- Parameters:
value
- a priority value. A lower value means a higher priority. The default value is the value ofPriority#normal()
.
-
-
Method Details
-
getValue
public long getValue()Returns the priority value.A lower value means a higher priority.
- Returns:
- the priority value. A lower value means a higher priority.
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<Priority>
-