Class Quantifier

java.lang.Object
org.spongepowered.asm.util.Quantifier

public final class Quantifier extends Object
A regex-style quantifier, specified as a number or pair of numbers in braces.
  • Field Details

    • DEFAULT

      public static Quantifier DEFAULT
      Default quantifier, used when a quantifier was not specified (empty string)
    • NONE

      public static Quantifier NONE
      Invalid (matches none)
    • SINGLE

      public static Quantifier SINGLE
      Single (matches zero or 1)
    • ANY

      public static Quantifier ANY
      Default (matches any)
    • PLUS

      public static Quantifier PLUS
      Plus (matches 1 or more)
  • Constructor Details

    • Quantifier

      public Quantifier(int min, int max)
  • Method Details

    • isDefault

      public boolean isDefault()
      Check whether this is a defaulted qualifier
    • getMin

      public int getMin()
      Get the literal min value
    • getMax

      public int getMax()
      Get the literal max value
    • getClampedMin

      public int getClampedMin()
      Get the clamped min value
    • getClampedMax

      public int getClampedMax()
      Get the clamped max value
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • parse

      public static Quantifier parse(String string)
      Parse a quantifier from the supplied string
      Parameters:
      string - string to parse
      Returns:
      parsed quantifier, malformed quantifiers return NONE
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object