Class AbilityRequirement

All Implemented Interfaces:
Requirement<Pokemon,PixelmonEntity,Ability>

public class AbilityRequirement extends AbstractPokemonRequirement<Ability>
  • Constructor Details

    • AbilityRequirement

      public AbilityRequirement()
    • AbilityRequirement

      public AbilityRequirement(Ability ability)
  • Method Details

    • create

      public ParseAttempt<List<Requirement<Pokemon,PixelmonEntity,?>>> create(String key, String spec)
      Description copied from class: AbstractRequirement
      Attempts to parse the spec with the key that was found in the spec string
      Specified by:
      create in class AbstractPokemonRequirement<Ability>
      Parameters:
      key - The key found
      spec - The spec being parsed
      Returns:
      The parse attempt
    • createInstance

      public ParseAttempt<Requirement<Pokemon,PixelmonEntity,Ability>> createInstance(Ability value)
      Description copied from interface: Requirement
      Creates a new instance of the requirement with the given value
      Parameters:
      value - The value
      Returns:
      The new requirement instance
    • isDataMatch

      public boolean isDataMatch(Pokemon pixelmon)
      Description copied from interface: Requirement
      If the data type matches the parsed requirement
      Parameters:
      pixelmon - The data to check against
      Returns:
      True if a match
    • applyData

      public void applyData(Pokemon pixelmon)
      Description copied from interface: Requirement
      Applies the parsed requirement to the data
      Parameters:
      pixelmon - The data
    • getValue

      public Ability getValue()
      Description copied from interface: Requirement
      Gets the internal value of the requirement
      Returns:
      The value stored