Class Priority

java.lang.Object
com.luciad.containers.Priority
All Implemented Interfaces:
Comparable<Priority>

public final class Priority extends Object implements 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 Link icon

    Fields
    Modifier and Type
    Field
    Description
    static 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 Link icon

    Constructors
    Constructor
    Description
    Priority(long value)
    Creates a new priority with the given value.
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    int
     
    boolean
    equals(Object other)
     
    long
    Returns the priority value.
    int
     

    Methods inherited from class java.lang.Object Link icon

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details Link icon

    • High Link icon

      public static final Priority High
      Preset priority value that represents a high priority.

      Its priority value is 5000. Priority order: High > Normal > Low > Fallback

    • Normal Link icon

      public static final Priority Normal
      Preset priority value that represents a default priority.

      Its priority value is 10000. Priority order: High > Normal > Low > Fallback

    • Low Link icon

      public static final Priority Low
      Preset priority value that represents a low priority.

      Its priority value is 20000. Priority order: High > Normal > Low > Fallback

    • Fallback Link icon

      public static final Priority Fallback
      Preset priority value that represents a fallback priority.

      Its priority value is 50000. Priority order: High > Normal > Low > Fallback

  • Constructor Details Link icon

    • Priority Link icon

      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 of Priority#normal().
  • Method Details Link icon

    • getValue Link icon

      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 Link icon

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode Link icon

      public int hashCode()
      Overrides:
      hashCode in class Object
    • compareTo Link icon

      public int compareTo(@NotNull Priority other)
      Specified by:
      compareTo in interface Comparable<Priority>