Class Parameter.Modifier.RangedModifier<T extends Comparable<T>>

java.lang.Object
org.skriptlang.skript.common.function.Parameter.Modifier.RangedModifier<T>
All Implemented Interfaces:
Parameter.Modifier
Enclosing interface:
Parameter.Modifier

public static class Parameter.Modifier.RangedModifier<T extends Comparable<T>> extends Object implements Parameter.Modifier
Modifier specifying valid range bounds for numeric parameters. Note that ALL instances will have the same hashCode and will be equal to Parameter.Modifier.RANGED. Avoid comparing these objects or putting multiple into a HashSet or HashMap!
  • Method Details

    • getMin

      public T getMin()
      Returns:
      Min value of the range (inclusive)
    • getMax

      public T getMax()
      Returns:
      Max value of the range (inclusive)
    • inRange

      public boolean inRange(Object input)
      Parameters:
      input - The value to test.
      Returns:
      Whether input is between min and max.
    • inRange

      public boolean inRange(Object @NotNull [] inputs)
      Parameters:
      inputs - The values to test.
      Returns:
      Whether all the inputs are between min and max.
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object