Interface Requirement<A,B,C>

Type Parameters:
A - The reforged object
B - The minecraft object
C - The data being stored in this requirement
All Known Implementing Classes:
AbilityRequirement, AbstractBooleanPokemonRequirement, AbstractBooleanRequirement, AbstractBooleanStatueRequirement, AbstractCardRequirement, AbstractIntegerPokemonRequirement, AbstractIntegerRequirement, AbstractIntegerStatueRequirement, AbstractPokemonRequirement, AbstractRecursivePokemonRequirement, AbstractRecursiveRequirement, AbstractRecursiveStatueRequirement, AbstractRequirement, AbstractStatueRequirement, AbstractStringPokemonRequirement, AbstractStringRequirement, AbstractStringStatueRequirement, AIRequirement, AnimatedRequirement, AnimationFrameRequirement, AnimationTypeRequirement, BlackAndWhiteShaderRequirement, BlackAndWhiteShaderRequirement, BossRequirement, BoundingBoxModeRequirement, CanMegaEvolveRequirement, CanMoveRequirement, CelShaderRequirement, CelShaderRequirement, CloneRequirement, CompatibleMoveRequirement, CrownedRequirement, CrownedRequirement, EggGroupRequirement, EggGroupRequirement, EggRequirement, EVsModifyRequirement, EVsRequirement, ExpRequirement, FormRequirement, FormRequirement, FriendshipRequirement, GenderRequirement, GenderRequirement, GenerationRequirement, GenerationRequirement, GenericBuiltPokemonRequirement, GigantamaxFactorRequirement, GimmighoulCoinsGivenRequirement, GrowthRequirement, GrowthRequirement, GrowthStageRequirement, GrowthStageRequirement, HasSpecFlagRequirement, HasSpecFlagRequirement, HeldItemRequirement, HiddenAbilityRequirement, IsBossRequirement, IVsModifyRequirement, IVsRequirement, LakeTrioRequirement, LakeTrioRequirement, LegendaryRequirement, LegendaryRequirement, LevelRequirement, LogicalAndRequirement, LogicalAndRequirement, LogicalNOTRequirement, LogicalNOTRequirement, LogicalOrRequirement, LogicalOrRequirement, MaximumFriendshipRequirement, MaximumLevelRequirement, MinimumFriendshipRequirement, MinimumLevelRequirement, MoveRequirement, NatureRequirement, NicknameRequirement, NicknameRequirement, NoDropsRequirement, NuggetsFedRequirement, OriginalTrainerNameRequirement, PaletteRequirement, PaletteRequirement, PokeBallRequirement, PokerusRequirement, PositionRequirement, PositionRequirement, PrimalEvolutionRequirement, PrimalEvolutionRequirement, RainbowShaderRequirement, RainbowShaderRequirement, RandomSpeciesRequirement, RandomSpeciesRequirement, RarityRequirement, ResetEVsRequirement, ResetIVsRequirement, RibbonRequirement, ShaderRequirement, ShaderRequirement, ShinyRequirement, ShinyRequirement, ShornRequirement, SpeciesRequirement, SpeciesRequirement, StatsModifyRequirement, StatsRequirement, StatueTextureRequirement, StatusRequirement, TypeRequirement, TypeRequirement, UltraBeastRequirement, UltraBeastRequirement, UltraBurstRequirement, UnbattleableRequirement, UnbreedableRequirement, UncatchableRequirement, UndexableRequirement, UntradeableRequirement, WildRequirement

public interface Requirement<A,B,C>
A basic requirement for matching and creating
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Applies the parsed requirement to the data
    void
    Applis the parsed requirement to the minecraft data
    create(String spec)
    Creates a list of requirements from the spec being parsed
    Creates a new instance of the requirement with the given value
    boolean
    fits(String spec)
    Checks if the given fits for this requirement
    The aliases of the requirement that it can match against
    default int
    Gets the order priority of the requirement.
    Gets the internal value of the requirement
    boolean
    If the data type matches the parsed requirement
    boolean
    If the minecraft type matches the parsed requirement
    default boolean
    If the spec should continue processing the results after applying this requirement.
  • Method Details

    • getPriority

      default int getPriority()
      Gets the order priority of the requirement. Higher number = higher priority (i.e. it is applied first)
      Returns:
      The priority
    • shouldContinue

      default boolean shouldContinue()
      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
      Returns:
      True if it should continue processing
    • getAliases

      List<String> getAliases()
      The aliases of the requirement that it can match against
      Returns:
      The aliases
    • fits

      boolean fits(String spec)
      Checks if the given fits for this requirement
      Parameters:
      spec - The parsed spec
      Returns:
      True if this requirement is found in the parameter
    • create

      ParseAttempt<List<Requirement<A,B,?>>> create(String spec)
      Creates a list of requirements from the spec being parsed
      Parameters:
      spec - The spec being parsed
      Returns:
      The new list of requirements
    • createInstance

      ParseAttempt<Requirement<A,B,C>> createInstance(C value)
      Creates a new instance of the requirement with the given value
      Parameters:
      value - The value
      Returns:
      The new requirement instance
    • isDataMatch

      boolean isDataMatch(A a)
      If the data type matches the parsed requirement
      Parameters:
      a - The data to check against
      Returns:
      True if a match
    • isMinecraftMatch

      boolean isMinecraftMatch(B b)
      If the minecraft type matches the parsed requirement
      Parameters:
      b - The minecraft data to check against
      Returns:
      True if a match
    • applyData

      void applyData(A a)
      Applies the parsed requirement to the data
      Parameters:
      a - The data
    • applyMinecraft

      void applyMinecraft(B b)
      Applis the parsed requirement to the minecraft data
      Parameters:
      b - The minecraft data
    • getValue

      C getValue()
      Gets the internal value of the requirement
      Returns:
      The value stored