Package org.spongepowered.asm.util

## Class Quantifier

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

    public final class Quantifier
    extends java.lang.Object

A regex-style quantifier, specified as a number or pair of numbers in braces.

### Field Summary

Fields
`static Quantifier` `ANY` Default (matches any)
`static Quantifier` `DEFAULT` Default quantifier, used when a quantifier was not specified (empty string)
`static Quantifier` `NONE` Invalid (matches none)
`static Quantifier` `PLUS` Plus (matches 1 or more)
`static Quantifier` `SINGLE` Single (matches zero or 1)

### Constructor Summary

Constructors
`Quantifier​(int min, int max)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`boolean` `equals​(java.lang.Object obj)`
`int` `getClampedMax()` Get the clamped max value
`int` `getClampedMin()` Get the clamped min value
`int` `getMax()` Get the literal max value
`int` `getMin()` Get the literal min value
`int` `hashCode()`
`boolean` `isDefault()` Check whether this is a defaulted qualifier
`static Quantifier` `parse​(java.lang.String string)` Parse a quantifier from the supplied string
`java.lang.String` `toString()`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Field Detail

#### 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 Detail

#### Quantifier

    public Quantifier​(int min,
                      int max)

### Method Detail

#### 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 java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`

#### parse

    public static Quantifier parse​(java.lang.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​(java.lang.Object obj)

Overrides:
  `equals` in class `java.lang.Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `java.lang.Object`