package com.github.qrokodial.sparkle.events.util;

public enum Priority {
    /**
     * For core functionality. Do not use unless you know exactly what you're doing. If unsure, use {@link #HIGHEST}.
     */
    REALTIME,

    /**
     * For things requiring the highest priority.
     */
    HIGHEST,

    /**
     * For things requiring higher priority.
     */
    HIGH,

    /**
     * The default priority. If unsure, use this.
     */
    NORMAL,

    /**
     * For things of low priority.
     */
    LOW,

    /**
     * For things of the lowest, non-monitoring priority. If you need to modify data, use this; Otherwise use {@link #MONITOR}.
     */
    LOWEST,

    /**
     * For things that need to monitor, but not modify.
     */
    MONITOR,
}

@@ -213,18 +213,21 @@
 REALTIME
+(3)
 ,%0A
-
 %0A    /**
@@ -296,16 +296,19 @@
  HIGHEST
+(2)
 ,%0A%0A    /
@@ -371,16 +371,19 @@
     HIGH
+(1)
 ,%0A%0A    /
@@ -453,16 +453,19 @@
   NORMAL
+(0)
 ,%0A%0A    /
@@ -517,16 +517,20 @@
 %0A    LOW
+(-1)
 ,%0A%0A    /
@@ -678,16 +678,20 @@
   LOWEST
+(-2)
 ,%0A%0A    /
@@ -768,12 +768,533 @@
  MONITOR
-,
+(-3);%0A%0A    private int id;%0A%0A    Priority(int id) %7B%0A        this.id = id;%0A    %7D%0A%0A    /**%0A     * Gets the inverse of the priority. %7B@link #HIGHEST%7D becomes %7B@link #LOWEST%7D, %7B@link #LOWEST%7D becomes%0A     * %7B@link #HIGHEST%7D, and so on.%0A     *%0A     * @return the inverse of the priority%0A     */%0A    public Priority inverse() %7B%0A        int id = -this.id;%0A        for (Priority priority : Priority.values()) %7B%0A            if (priority.id == id) %7B%0A                return priority;%0A            %7D%0A        %7D%0A        return null;%0A    %7D
 %0A%7D%0A

Allow for getting the inverse of a priority