Class ChoiceGroup

java.lang.Object
io.github.syst3ms.skriptparser.pattern.ChoiceGroup
All Implemented Interfaces:
PatternElement

public class ChoiceGroup extends Object implements PatternElement
A group of multiple choices, represented by ChoiceElements
  • Constructor Details

  • Method Details

    • getChoices

      public List<ChoiceElement> getChoices()
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • match

      public int match(String s, int index, MatchContext context)
      Description copied from interface: PatternElement
      Attempts to match the PatternElement to a string at a specified index. About the index, make sure to never increment the index by some arbitrary value when returning
      Specified by:
      match in interface PatternElement
      Parameters:
      s - the string to match this PatternElement against
      index - the index of the string at which this PatternElement should be matched
      Returns:
      the index at which the matching should continue afterwards if successful. Otherwise, -1
    • toString

      public String toString()
      Overrides:
      toString in class Object