Package com.pixelmonmod.api.requirement
Class AbstractRequirement<A,B,C>
java.lang.Object
com.pixelmonmod.api.requirement.AbstractRequirement<A,B,C>
- Type Parameters:
A
- The reforged objectB
- the minecraft objectC
- the value data type
- All Implemented Interfaces:
Requirement<A,
B, C>
- Direct Known Subclasses:
AbstractBooleanRequirement
,AbstractCardRequirement
,AbstractIntegerRequirement
,AbstractPokemonRequirement
,AbstractStatueRequirement
,AbstractStringRequirement
Basic abstract implementation for specs following the format :
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionParseAttempt<List<Requirement<A,
B, ?>>> Creates a list of requirements from the spec being parsedprotected abstract ParseAttempt<List<Requirement<A,
B, ?>>> Attempts to parse the spec with the key that was found in the spec stringboolean
Checks if the given fits for this requirementThe aliases of the requirement that it can match againstMethods 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, getPriority, getValue, isDataMatch, isMinecraftMatch, shouldContinue
-
Field Details
-
keys
-
-
Constructor Details
-
AbstractRequirement
-
-
Method Details
-
getAliases
Description copied from interface:Requirement
The aliases of the requirement that it can match against- Specified by:
getAliases
in interfaceRequirement<A,
B, C> - Returns:
- The aliases
-
fits
Description copied from interface:Requirement
Checks if the given fits for this requirement- Specified by:
fits
in interfaceRequirement<A,
B, C> - 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<A,
B, C> - Parameters:
spec
- The spec being parsed- Returns:
- The new list of requirements
-
create
Attempts to parse the spec with the key that was found in the spec string- Parameters:
key
- The key foundspec
- The spec being parsed- Returns:
- The parse attempt
-