Enum Class Reduction
- All Implemented Interfaces:
Serializable,Comparable<Reduction>,Constable
Enumeration of logical reduction modes for combining multiple item checks.
Reduction defines how multiple item IDs in an ItemRequirement
should be combined when checking for satisfaction.
Reduction Modes
AND- All items must be present (conjunction)OR- At least one item must be present (disjunction)NONE- No items should be present (negation)
Usage Examples
// Require ALL of these items
new ItemRequirement(Reduction.AND, List.of(
ItemID.HAMMER, ItemID.CHISEL, ItemID.KNIFE
), 1);
// Require ANY of these light sources
new ItemRequirement(Reduction.OR, List.of(
ItemID.BULLSEYE_LANTERN_LIT,
ItemID.KANDARIN_HEADGEAR_4,
ItemID.FIREMAKING_CAPE
), Location.EITHER, 1);
// Require player does NOT have these items (blacklist)
new ItemRequirement(Reduction.NONE, List.of(
ItemID.KARAMJA_RUM
), 1);
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
-
Enum Constant Details
-
AND
All items in the list must meet the count requirement. -
OR
At least one item in the list must meet the count requirement. -
NONE
None of the items in the list should meet the count requirement.
-
-
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
-