Interface PrimitiveBooleanArrayValidator
- All Superinterfaces:
ArrayComponent<PrimitiveBooleanArrayValidator,,boolean[], Boolean> ObjectComponent<PrimitiveBooleanArrayValidator,,boolean[]> ValidatorComponent<PrimitiveBooleanArrayValidator,boolean[]>
public interface PrimitiveBooleanArrayValidator
extends ValidatorComponent<PrimitiveBooleanArrayValidator,boolean[]>, ObjectComponent<PrimitiveBooleanArrayValidator,boolean[]>, ArrayComponent<PrimitiveBooleanArrayValidator,boolean[],Boolean>
Validates the state of a
boolean[].-
Method Summary
Modifier and TypeMethodDescriptioncontains(boolean expected) Ensures that the array contains an element.Ensures that the array contains an element.doesNotContain(boolean unwanted) Ensures that the array does not containunwanted.doesNotContain(boolean unwanted, String name) Ensures that the array does not containunwanted.Methods declared in interface com.github.cowwoc.requirements10.java.validator.component.ArrayComponent
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, isSorted, lengthMethods declared in interface com.github.cowwoc.requirements10.java.validator.component.ObjectComponent
getValue, isEqualTo, isEqualTo, isInstanceOf, isInstanceOf, isNotEqualTo, isNotEqualTo, isNotInstanceOf, isNotInstanceOf, isNotNull, isNull, isReferenceEqualTo, isReferenceNotEqualToMethods declared in interface com.github.cowwoc.requirements10.java.validator.component.ValidatorComponent
and, elseGetFailures, elseThrow, getContext, getContextAsString, getName, getValueOrDefault, validationFailed, withContext
-
Method Details
-
contains
Ensures that the array contains an element.- Parameters:
expected- the element- Returns:
- this
- Throws:
NullPointerException- if the value is nullIllegalArgumentException- if the array does not containexpected
-
contains
Ensures that the array contains an element.- Parameters:
expected- the elementname- the name of the element- Returns:
- this
- Throws:
NullPointerException- if the value ornameare nullIllegalArgumentException- if:nameis emptynamecontains whitespacenameis already in use by the value being validated or the validator context- the array does not contain
expected
-
doesNotContain
Ensures that the array does not containunwanted.- Parameters:
unwanted- the unwanted element- Returns:
- this
- Throws:
NullPointerException- if the value is nullIllegalArgumentException- if the array containsunwanted
-
doesNotContain
Ensures that the array does not containunwanted.- Parameters:
unwanted- the unwanted elementname- the name of the unwanted element- Returns:
- this
- Throws:
NullPointerException- if the value ornameare nullIllegalArgumentException- if:nameis emptynamecontains whitespacenameis already in use by the value being validated or the validator context- the array contains
unwanted
-