Class IntegerSchema

java.lang.Object
jsonvalues.spec.IntegerSchema

public final class IntegerSchema extends Object
A class representing the schema for integer values in a JSON spec. It allows setting constraints such as minimum and maximum values.
  • Method Details

    • withMinimum

      public static IntegerSchema withMinimum(int minimum)
      Creates an IntegerSchema with a minimum constraint.
      Parameters:
      minimum - The minimum value for the integer number.
      Returns:
      A IntegerSchema instance with the specified minimum constraint.
    • withMaximum

      public static IntegerSchema withMaximum(int maximum)
      Creates an IntegerSchema with a maximum constraint.
      Parameters:
      maximum - The maximum value for the integer number.
      Returns:
      A IntegerSchema instance with the specified maximum constraint.
    • between

      public static IntegerSchema between(int minimum, int maximum)
      Creates an IntegerSchema with both minimum and maximum constraints.
      Parameters:
      minimum - The minimum value for the integer number.
      maximum - The maximum value for the integer number.
      Returns:
      A IntegerSchema instance with the specified minimum and maximum constraints.