Enum Class UpgradeBooleanModifier

java.lang.Object
java.lang.Enum<UpgradeBooleanModifier>
de.Keyle.MyPet.api.skill.modifier.UpgradeBooleanModifier
All Implemented Interfaces:
UpgradeModifier<Boolean>, Serializable, Comparable<UpgradeBooleanModifier>, Constable

public enum UpgradeBooleanModifier extends Enum<UpgradeBooleanModifier> implements UpgradeModifier<Boolean>
An UpgradeModifier for boolean skill parameters.

Unlike numeric modifiers that add/subtract, boolean modifiers unconditionally replace the current value with their own. This is typically used to enable or disable a skill feature at a specific level (e.g., enabling fire aspect on the Damage skill).

Implemented as an enum with exactly two constants: True and False.

  • Enum Constant Details

  • Method Details

    • values

      public static UpgradeBooleanModifier[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static UpgradeBooleanModifier valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • modify

      public Boolean modify(Boolean value)
      Applies this modifier to the given current value, producing an updated result. Unconditionally returns this modifier's boolean value, ignoring the input.
      Specified by:
      modify in interface UpgradeModifier<Boolean>
      Parameters:
      value - the current parameter value before modification
      Returns:
      the modified parameter value
    • value

      public Boolean value()
      Description copied from interface: UpgradeModifier
      Returns the raw modifier value carried by this instance.
      Specified by:
      value in interface UpgradeModifier<Boolean>
      Returns:
      the value this modifier applies