Enum Class AttributeOperation
java.lang.Object
java.lang.Enum<AttributeOperation>
com.github.darksoulq.abyssallib.world.data.attribute.AttributeOperation
- All Implemented Interfaces:
Serializable, Comparable<AttributeOperation>, Constable
Defines arithmetic operations that can be applied to numeric attributes via
AttributeModifier.
These operations are applied in the context of numeric types such as Integer, Float,
Double, Long, Short, Byte, and BigDecimal.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic AttributeOperationReturns the enum constant of this class with the specified name.static AttributeOperation[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
ADD
Adds the modifier to the base value.Example:
base + modifier -
SUBTRACT
Subtracts the modifier from the base value.Example:
base - modifier -
MULTIPLY
Multiplies the base value by the modifier.Example:
base * modifier -
DIVIDE
Divides the base value by the modifier. If the modifier is zero, division is skipped and the base value is returned unchanged.Example:
base / modifier
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-