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,AbstractIntegerRequirement,AbstractPokemonRequirement,AbstractStatueRequirement,AbstractStringRequirement
Basic abstract implementation for specs following the format :
-
Field Summary
Fields -
Constructor Summary
Constructors -
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 stringbooleanChecks 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, waitMethods 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:RequirementThe aliases of the requirement that it can match against- Specified by:
getAliasesin interfaceRequirement<A,B, C> - Returns:
- The aliases
-
fits
Description copied from interface:RequirementChecks if the given fits for this requirement- Specified by:
fitsin interfaceRequirement<A,B, C> - Parameters:
spec- The parsed spec- Returns:
- True if this requirement is found in the parameter
-
create
Description copied from interface:RequirementCreates a list of requirements from the spec being parsed- Specified by:
createin 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
-