Package jsonvalues.spec
Class IntegerSchema
java.lang.Object
jsonvalues.spec.IntegerSchema
A class representing the schema for integer values in a JSON spec. It allows setting constraints such as minimum and
maximum values.
-
Method Summary
Modifier and TypeMethodDescriptionstatic IntegerSchemabetween(int minimum, int maximum) Creates an IntegerSchema with both minimum and maximum constraints.static IntegerSchemawithMaximum(int maximum) Creates an IntegerSchema with a maximum constraint.static IntegerSchemawithMinimum(int minimum) Creates an IntegerSchema with a minimum constraint.
-
Method Details
-
withMinimum
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
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
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.
-