Annotation Interface SizeConstraint
Constrains a configuration element's size.
The SizeConstraint may be used to annotate any configuration element that has a size, such as a
List<?> or String.
Note: to constrain the size of the strings in a List<String>, rather than the size of the list itself,
annotate the list's type parameter as follows: List<@SizeConstraint String>.
To constrain the size of an optional string, annotate the optional's type parameter as follows:
Optional<@SizeConstraint String>.
-
Optional Element Summary
Optional Elements -
Field Summary
Fields
-
Field Details
-
MIN_DEFAULT
static final int MIN_DEFAULT- See Also:
-
MAX_DEFAULT
static final int MAX_DEFAULT- See Also:
-
-
Element Details
-
min
int min- Returns:
- minimum allowed size for the annotated element.
- Default:
- 0
-
max
int max- Returns:
- maximum allowed size for the annotated element.
- Default:
- 2147483647
-