Interface Restriction

All Superinterfaces:
Predicate<ConfigValue>
All Known Implementing Classes:
Restriction.DoubleRange, Restriction.IntRange

public interface Restriction extends Predicate<ConfigValue>
Represents a restriction that can be applied to a ConfigValue.

Created by covers1624 on 17/4/22.

  • Method Details

    • test

      boolean test(ConfigValue configValue)
      Specified by:
      test in interface Predicate<ConfigValue>
    • describe

      String describe()
      Describe this Restriction for display.
      Returns:
      The description.
    • intRange

      static Restriction intRange(int min, int max)
      Represents an Integer range restriction. The value must pass min <= value <= max
      Parameters:
      min - The minimum value. (inclusive)
      max - The maximum value. (inclusive)
      Returns:
      The Restriction.
    • doubleRange

      static Restriction doubleRange(double min, double max)
      Represents a Double range restriction. The value must pass min <= value <= max
      Parameters:
      min - The minimum value. (inclusive)
      max - The maximum value. (inclusive)
      Returns:
      The Restriction.