Interface ListRestriction

All Known Implementing Classes:
ListRestriction.DoubleRange, ListRestriction.IntRange

public interface ListRestriction
Represents a restriction that can be applied to a ConfigValueList.

Created by covers1624 on 19/5/22.

  • Method Details

    • test

      Test the provided ConfigValueList against this ListRestriction.
      Parameters:
      values - The ConfigValueList to test.
      Returns:
      The result. Empty if the test passes, otherwise contains the first index and value that does not pass.
    • describe

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

      static ListRestriction 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 ListRestriction 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.