Class AbstractRecursiveStatueRequirement
java.lang.Object
com.pixelmonmod.api.statue.requirement.AbstractRecursiveStatueRequirement
- All Implemented Interfaces:
Requirement<Pokemon,
StatueEntity, List<Requirement<Pokemon, StatueEntity, ?>>>
- Direct Known Subclasses:
LogicalAndRequirement
,LogicalOrRequirement
public abstract class AbstractRecursiveStatueRequirement
extends Object
implements Requirement<Pokemon,StatueEntity,List<Requirement<Pokemon,StatueEntity,?>>>
The basics for a recursive requirement
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
protected
AbstractRecursiveStatueRequirement
(Set<String> keys, List<Requirement<Pokemon, StatueEntity, ?>> requirements) -
Method Summary
Modifier and TypeMethodDescriptionCreates a list of requirements from the spec being parsedboolean
Checks if the given fits for this requirementThe aliases of the requirement that it can match againstint
Gets the order priority of the requirement.getValue()
Gets the internal value of the requirementboolean
If the spec should continue processing the results after applying this requirement.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.pixelmonmod.api.requirement.Requirement
applyData, applyMinecraft, createInstance, isDataMatch, isMinecraftMatch
-
Field Details
-
keys
-
requirements
-
-
Constructor Details
-
AbstractRecursiveStatueRequirement
-
AbstractRecursiveStatueRequirement
protected AbstractRecursiveStatueRequirement(Set<String> keys, List<Requirement<Pokemon, StatueEntity, ?>> requirements)
-
-
Method Details
-
getAliases
Description copied from interface:Requirement
The aliases of the requirement that it can match against- Specified by:
getAliases
in interfaceRequirement<Pokemon,
StatueEntity, List<Requirement<Pokemon, StatueEntity, ?>>> - Returns:
- The aliases
-
getPriority
public int getPriority()Description copied from interface:Requirement
Gets the order priority of the requirement. Higher number = higher priority (i.e. it is applied first)- Specified by:
getPriority
in interfaceRequirement<Pokemon,
StatueEntity, List<Requirement<Pokemon, StatueEntity, ?>>> - Returns:
- The priority
-
shouldContinue
public boolean shouldContinue()Description copied from interface:Requirement
If the spec should continue processing the results after applying this requirement.
For example, for a logical AND this would return false as it handles the processing of the remaining requirements- Specified by:
shouldContinue
in interfaceRequirement<Pokemon,
StatueEntity, List<Requirement<Pokemon, StatueEntity, ?>>> - Returns:
- True if it should continue processing
-
fits
Description copied from interface:Requirement
Checks if the given fits for this requirement- Specified by:
fits
in interfaceRequirement<Pokemon,
StatueEntity, List<Requirement<Pokemon, StatueEntity, ?>>> - Parameters:
spec
- The parsed spec- Returns:
- True if this requirement is found in the parameter
-
create
Description copied from interface:Requirement
Creates a list of requirements from the spec being parsed- Specified by:
create
in interfaceRequirement<Pokemon,
StatueEntity, List<Requirement<Pokemon, StatueEntity, ?>>> - Parameters:
spec
- The spec being parsed- Returns:
- The new list of requirements
-
getValue
Description copied from interface:Requirement
Gets the internal value of the requirement- Specified by:
getValue
in interfaceRequirement<Pokemon,
StatueEntity, List<Requirement<Pokemon, StatueEntity, ?>>> - Returns:
- The value stored
-