Enum-Klasse Priority

java.lang.Object
java.lang.Enum<Priority>
de.luckymcdev.foundryengine.common.priority.Priority
Alle implementierten Schnittstellen:
Serializable, Comparable<Priority>, Constable

public enum Priority extends Enum<Priority>
Generic Priority Enum for ordering and prioritization. Lower ordinal = higher priority (HIGHEST loads/executes first).
  • Enum-Konstanten - Details

    • HIGHEST

      public static final Priority HIGHEST
    • HIGH

      public static final Priority HIGH
    • NORMAL

      public static final Priority NORMAL
    • LOW

      public static final Priority LOW
    • LOWEST

      public static final Priority LOWEST
  • Methodendetails

    • values

      public static Priority[] values()
      Gibt ein Array mit den Konstanten dieser Enum-Klasse in der Reihenfolge ihrer Deklaration zurück.
      Gibt zurück:
      ein Array mit den Konstanten dieser Enum-Klasse in der Reihenfolge ihrer Deklaration
    • valueOf

      public static Priority valueOf(String name)
      Gibt die Enum-Konstante dieser Klasse mit dem angegebenen Namen zurück. Die Zeichenfolge muss exakt mit einer ID übereinstimmen, mit der eine Enum-Konstante in dieser Klasse deklariert wird. (Zusätzliche Leerzeichen sind nicht zulässig.)
      Parameter:
      name - Name der zurückzugebenden Enumerationskonstante.
      Gibt zurück:
      Enumerationskonstante mit dem angegebenen Namen
      Löst aus:
      IllegalArgumentException - wenn diese Enum-Klasse keine Konstante mit dem angegebenen Namen enthält
      NullPointerException - wenn das Argument nicht angegeben wird
    • comparator

      public static Comparator<Priority> comparator()
      Get a comparator that sorts by priority (highest first). Usage: list.sort(Priority.comparator())
      Gibt zurück:
      comparator for sorting by priority
    • comparing

      public static <T> Comparator<T> comparing(Function<? super T, Priority> keyExtractor)
      Get a comparator that sorts objects by their priority (highest first). Usage: entrypoints.sort(Priority.comparing(BundleEntrypoint::getPriority))
      Parameter:
      keyExtractor - function to extract priority from object
      Gibt zurück:
      comparator for sorting objects by priority
    • comparingReversed

      public static Comparator<Object> comparingReversed(Function<Object,Priority> keyExtractor)
      Get a comparator that sorts objects by priority in reverse (lowest first).
      Parameter:
      keyExtractor - function to extract priority from object
      Gibt zurück:
      reverse comparator for sorting objects by priority
    • highest

      public static Priority highest()
      Get the priority with the highest precedence (HIGHEST).
      Gibt zurück:
      HIGHEST priority
    • lowest

      public static Priority lowest()
      Get the priority with the lowest precedence (LOWEST).
      Gibt zurück:
      LOWEST priority
    • normal

      public static Priority normal()
      Get the default priority (NORMAL).
      Gibt zurück:
      NORMAL priority
    • parse

      public static Priority parse(String name)
      Parse priority from string (case-insensitive).
      Parameter:
      name - priority name
      Gibt zurück:
      parsed Priority, or NORMAL if invalid
    • parse

      public static Priority parse(String name, Priority fallback)
      Parse priority from string with fallback.
      Parameter:
      name - priority name
      fallback - fallback priority if parsing fails
      Gibt zurück:
      parsed Priority, or fallback if invalid
    • getValue

      public int getValue()
      Get the numeric value of this priority. Lower values = higher priority.
      Gibt zurück:
      numeric priority value
    • isHigherThan

      public boolean isHigherThan(Priority other)
      Check if this priority is higher than another.
      Parameter:
      other - priority to compare against
      Gibt zurück:
      true if this priority is higher (executes first)
    • isLowerThan

      public boolean isLowerThan(Priority other)
      Check if this priority is lower than another.
      Parameter:
      other - priority to compare against
      Gibt zurück:
      true if this priority is lower (executes last)
    • isSameAs

      public boolean isSameAs(Priority other)
      Check if this priority is the same as another.
      Parameter:
      other - priority to compare against
      Gibt zurück:
      true if priorities are equal
    • isAtLeast

      public boolean isAtLeast(Priority other)
      Check if this priority is at least as high as another.
      Parameter:
      other - priority to compare against
      Gibt zurück:
      true if this >= other
    • isAtMost

      public boolean isAtMost(Priority other)
      Check if this priority is at most as high as another.
      Parameter:
      other - priority to compare against
      Gibt zurück:
      true if this is greater than 'other' priority
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Enum<Priority>