Enum Positivity
- java.lang.Object
-
- java.lang.Enum<Positivity>
-
- net.runelite.client.plugins.itemstats.Positivity
-
- All Implemented Interfaces:
Serializable
,Comparable<Positivity>
public enum Positivity extends Enum<Positivity>
Positivity represents how positive or negative a stat change is. This is turned into the color shown to the user in the toolip.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BETTER_CAPPED
The stat change goes over the cap, but does not net 0BETTER_SOMECAPPED
Some stat changes were fully consumed, some were not.BETTER_UNCAPPED
The stat change is fully consumed.NO_CHANGE
There is no change, ie: The stat is already capped.WORSE
The stat is lower than it was before.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Color
getColor(ItemStatConfig config, Positivity positivity)
static Positivity
valueOf(String name)
Returns the enum constant of this type with the specified name.static Positivity[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
WORSE
public static final Positivity WORSE
The stat is lower than it was before.
-
NO_CHANGE
public static final Positivity NO_CHANGE
There is no change, ie: The stat is already capped.
-
BETTER_CAPPED
public static final Positivity BETTER_CAPPED
The stat change goes over the cap, but does not net 0
-
BETTER_SOMECAPPED
public static final Positivity BETTER_SOMECAPPED
Some stat changes were fully consumed, some were not. This should NOT be returned by a single stat change. This should only be used by aStatChangeCalculator
-
BETTER_UNCAPPED
public static final Positivity BETTER_UNCAPPED
The stat change is fully consumed. NB: a boost that hits the cap, but does not go over it is still consideredBETTER_UNCAPPED
-
-
Method Detail
-
values
public static Positivity[] 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 (Positivity c : Positivity.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Positivity valueOf(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getColor
public static Color getColor(ItemStatConfig config, Positivity positivity)
-
-