Interface ListValidator<T extends List<E>,E>
- Type Parameters:
T
- the type of the listE
- the type of elements in the list
- All Superinterfaces:
CollectionComponent<ListValidator<T,
,E>, E> ObjectComponent<ListValidator<T,
,E>, T> ValidatorComponent<ListValidator<T,
E>, T>
public interface ListValidator<T extends List<E>,E>
extends ValidatorComponent<ListValidator<T,E>,T>, ObjectComponent<ListValidator<T,E>,T>, CollectionComponent<ListValidator<T,E>,E>
Validates the state of a
List
.-
Method Summary
Modifier and TypeMethodDescriptionisSorted
(Comparator<E> comparator) Ensures that the list is sorted.Methods declared in interface com.github.cowwoc.requirements10.java.validator.component.CollectionComponent
contains, contains, containsAll, containsAll, containsAll, containsAll, containsAny, containsAny, containsAny, containsAny, containsExactly, containsExactly, containsExactly, containsExactly, doesNotContain, doesNotContain, doesNotContainAll, doesNotContainAll, doesNotContainAll, doesNotContainAll, doesNotContainAny, doesNotContainAny, doesNotContainAny, doesNotContainAny, doesNotContainDuplicates, doesNotContainExactly, doesNotContainExactly, doesNotContainExactly, doesNotContainExactly, isEmpty, isNotEmpty, size
Methods declared in interface com.github.cowwoc.requirements10.java.validator.component.ObjectComponent
getValue, isEqualTo, isEqualTo, isInstanceOf, isInstanceOf, isNotEqualTo, isNotEqualTo, isNotInstanceOf, isNotInstanceOf, isNotNull, isNull, isReferenceEqualTo, isReferenceNotEqualTo
Methods declared in interface com.github.cowwoc.requirements10.java.validator.component.ValidatorComponent
and, elseGetFailures, elseThrow, getContext, getContextAsString, getName, getValueOrDefault, validationFailed, withContext
-
Method Details
-
isSorted
Ensures that the list is sorted.- Parameters:
comparator
- the comparator that defines the order of the elements- Returns:
- this
- Throws:
NullPointerException
- if the value orcomparator
are nullIllegalArgumentException
- if the list is not sorted- See Also:
-