de.caff.util.concurrent

## Enum Priority

- java.lang.Object
- - java.lang.Enum<Priority>
  - - de.caff.util.concurrent.Priority

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Priority>

      public enum Priority
      extends java.lang.Enum<Priority>

  Execution priority.

  In simple environments it is recommended to use only `Low` and `High` as it leaves finer granularity possibilities if required later.

  Author:
    Rammi

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `High` High priority.
    `Higher` Higher than high priority.
    `Highest` Highest priority.
    `Low` Low priority.
    `Lower` Lower than low priority.
    `Lowest` Lowest possible priority.
    `Medium` Medium priority.
    `MediumHigh` Higher than medium priority.
    `MediumLow` Lower than medium priority.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Priority` | `decrease()` Get a priority which is decreased one step if this is not already the `lowest` priority.
    `static Priority` | `decreased(Priority priority)` Get a decreased priority.
    `Priority` | `increase()` Get a priority which is increased one step if this is not already the `highest` priority.
    `static Priority` | `increased(Priority priority)` Get an increased priority.
    `static Priority` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
    `static Priority[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### Lowest

          public static final Priority Lowest

      Lowest possible priority.

    - #### Lower

          public static final Priority Lower

      Lower than low priority.

    - #### Low

          public static final Priority Low

      Low priority.

    - #### MediumLow

          public static final Priority MediumLow

      Lower than medium priority.

    - #### Medium

          public static final Priority Medium

      Medium priority.

    - #### MediumHigh

          public static final Priority MediumHigh

      Higher than medium priority.

    - #### High

          public static final Priority High

      High priority.

    - #### Higher

          public static final Priority Higher

      Higher than high priority.

    - #### Highest

          public static final Priority Highest

      Highest priority.

  - ### Method Detail

    - #### values

          public static Priority[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (Priority c : Priority.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static Priority valueOf(java.lang.String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
        `java.lang.NullPointerException` - if the argument is null

    - #### increase

          @NotNull
          public Priority increase()

      Get a priority which is increased one step if this is not already the `highest` priority.
      Returns:
        increased priority

    - #### decrease

          @NotNull
          public Priority decrease()

      Get a priority which is decreased one step if this is not already the `lowest` priority.
      Returns:
        decreased priority

    - #### increased

          @NotNull
          public static Priority increased(@NotNull
                                                    Priority priority)

      Get an increased priority.
      Parameters:
        `priority` - priority to increase
      Returns:
        priority increased by one step if possible, otherwise same priority as `priority`

    - #### decreased

          @NotNull
          public static Priority decreased(@NotNull
                                                    Priority priority)

      Get a decreased priority.
      Parameters:
        `priority` - priority to decrease
      Returns:
        priority decreased by one step if possible, otherwise same priority as `priority`