public class SelectionLengthValidator<E> extends CustomValidator<ObservableList<E>>
Modifier and Type | Method and Description |
---|---|
static <T> SelectionLengthValidator<T> |
atLeast(int min,
String errorMessage)
Creates an SelectionLengthValidator with a given lower bound.
|
static <T> SelectionLengthValidator<T> |
between(int min,
int max,
String errorMessage)
Creates an SelectionLengthValidator with given lower and upper bounds.
|
static <T> SelectionLengthValidator<T> |
exactly(int value,
String errorMessage)
Creates a SelectionLengthValidator with a given lower and upper bound,
which are equal.
|
static <T> SelectionLengthValidator<T> |
upTo(int max,
String errorMessage)
Creates an SelectionLengthValidator with a given upper bound.
|
forPredicate, validate
public static <T> SelectionLengthValidator<T> between(int min, int max, String errorMessage)
min
- The lower bound for the validation.max
- The upper bound for the validation.errorMessage
- The error message that is returned if the validation fails.IllegalArgumentException
- Thrown if the minimum is a negative number.public static <T> SelectionLengthValidator<T> atLeast(int min, String errorMessage)
min
- The lower bound for the validation.errorMessage
- The error message that is returned if the validation fails.IllegalArgumentException
- Thrown if the minimum is a negative number.public static <T> SelectionLengthValidator<T> upTo(int max, String errorMessage)
max
- The upper bound for the validation.errorMessage
- The error message that is returned if the validation fails.public static <T> SelectionLengthValidator<T> exactly(int value, String errorMessage)
value
- The lower and upper bound for the validation.errorMessage
- The error message that is returned if the validation fails.Copyright © 2017. All rights reserved.