Enum Rune

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Rune>

    public enum Rune
    extends java.lang.Enum<Rune>
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static Rune byItemId​(int itemId)
      Retrieves the Rune associated with the specified item ID.
      static Rune[] getComboRunes​(Rune rune)
      Retrieves an array of combo runes that can be derived from the specified base Rune.
      boolean isComboRune()
      Determines whether this Rune is a combo rune.
      boolean providesRune​(Rune rune)
      Determines whether this Rune provides the specified Rune.
      static Rune valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Rune[] 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

      • AIR

        public static final Rune AIR
      • WATER

        public static final Rune WATER
      • EARTH

        public static final Rune EARTH
      • FIRE

        public static final Rune FIRE
      • MIND

        public static final Rune MIND
      • CHAOS

        public static final Rune CHAOS
      • DEATH

        public static final Rune DEATH
      • BLOOD

        public static final Rune BLOOD
      • COSMIC

        public static final Rune COSMIC
      • NATURE

        public static final Rune NATURE
      • LAW

        public static final Rune LAW
      • BODY

        public static final Rune BODY
      • SOUL

        public static final Rune SOUL
      • ASTRAL

        public static final Rune ASTRAL
      • MIST

        public static final Rune MIST
      • MUD

        public static final Rune MUD
      • DUST

        public static final Rune DUST
      • LAVA

        public static final Rune LAVA
      • STEAM

        public static final Rune STEAM
      • SMOKE

        public static final Rune SMOKE
      • WRATH

        public static final Rune WRATH
      • SUNFIRE

        public static final Rune SUNFIRE
      • AETHER

        public static final Rune AETHER
    • Method Detail

      • values

        public static Rune[] 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 (Rune c : Rune.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Rune 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
      • providesRune

        public boolean providesRune​(Rune rune)
        Determines whether this Rune provides the specified Rune.

        This method checks if the current Rune is equal to the provided Rune, or if the provided Rune is included in this Rune's base runes. Base runes represent the elemental components of a combo Rune.

        Parameters:
        rune - The Rune to check against this Rune. If rune is null, the method will return false.
        Returns:
        true if the specified Rune is equal to this Rune, or if it is contained within this Rune's base runes; false otherwise.
      • isComboRune

        public boolean isComboRune()
        Determines whether this Rune is a combo rune.

        A combo rune is a type of rune that consists of multiple elemental components, represented internally by an array of base runes. This method checks if the Rune has any associated base runes.

        Returns:
        true if this Rune has one or more associated base runes, indicating it is a combo rune; false otherwise.
      • byItemId

        public static Rune byItemId​(int itemId)
        Retrieves the Rune associated with the specified item ID.

        This method searches through all available Rune values and compares their associated item IDs to the provided itemId. If a match is found, the corresponding Rune is returned. Otherwise, null is returned if no matching Rune exists.

        Parameters:
        itemId - The item ID used to identify the corresponding Rune.
        Returns:
        The Rune associated with the specified itemId, or null if no match is found.
      • getComboRunes

        public static Rune[] getComboRunes​(Rune rune)
        Retrieves an array of combo runes that can be derived from the specified base Rune.

        A combo rune is defined as a rune that includes the specified base rune as one of its elemental components. This method will return all applicable combo runes for the given input rune.

        Parameters:
        rune - The base Rune for which to find applicable combo runes. If the specified rune is not part of any combo rune, an empty array will be returned.
        Returns:
        An array of Rune representing all combo runes that include the provided base rune. If no combo runes are found for the given rune, an empty array is returned.