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

    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

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

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

    Methods inherited from class java.lang.Object

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

    • High

      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

      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

      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

      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

    • 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 of Priority#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

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

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

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