Enum Rune
- java.lang.Object
-
- java.lang.Enum<Rune>
-
- com.kraken.api.service.magic.rune.Rune
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RunebyItemId(int itemId)Retrieves theRuneassociated with the specified item ID.static Rune[]getComboRunes(Rune rune)Retrieves an array of combo runes that can be derived from the specified baseRune.booleanisComboRune()Determines whether thisRuneis a combo rune.booleanprovidesRune(Rune rune)Determines whether thisRuneprovides the specifiedRune.static RunevalueOf(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.
-
-
-
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 namejava.lang.NullPointerException- if the argument is null
-
providesRune
public boolean providesRune(Rune rune)
Determines whether thisRuneprovides the specifiedRune.This method checks if the current
Runeis equal to the providedRune, or if the providedRuneis included in thisRune's base runes. Base runes represent the elemental components of a comboRune.- Parameters:
rune- TheRuneto check against thisRune. Ifruneisnull, the method will returnfalse.- Returns:
trueif the specifiedRuneis equal to thisRune, or if it is contained within thisRune's base runes;falseotherwise.
-
isComboRune
public boolean isComboRune()
Determines whether thisRuneis 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
Runehas any associated base runes.- Returns:
trueif thisRunehas one or more associated base runes, indicating it is a combo rune;falseotherwise.
-
byItemId
public static Rune byItemId(int itemId)
Retrieves theRuneassociated with the specified item ID.This method searches through all available
Runevalues and compares their associated item IDs to the provideditemId. If a match is found, the correspondingRuneis returned. Otherwise,nullis returned if no matchingRuneexists.- Parameters:
itemId- The item ID used to identify the correspondingRune.- Returns:
- The
Runeassociated with the specifieditemId, ornullif no match is found.
-
getComboRunes
public static Rune[] getComboRunes(Rune rune)
Retrieves an array of combo runes that can be derived from the specified baseRune.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 baseRunefor 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
Runerepresenting all combo runes that include the provided base rune. If no combo runes are found for the given rune, an empty array is returned.
-
-