Interface ByteArrayValidator
- All Superinterfaces:
ArrayComponent<ByteArrayValidator,
,Byte, byte[]> ObjectComponent<ByteArrayValidator,
,byte[]> ValidatorComponent<ByteArrayValidator,
byte[]>
public interface ByteArrayValidator
extends ValidatorComponent<ByteArrayValidator,byte[]>, ObjectComponent<ByteArrayValidator,byte[]>, ArrayComponent<ByteArrayValidator,Byte,byte[]>
Validates the state of an
byte[]
.-
Method Summary
Modifier and TypeMethodDescriptioncontains
(byte expected) Ensures that the array contains an element.Ensures that the array contains an element.doesNotContain
(byte unwanted) Ensures that the array does not containunwanted
.doesNotContain
(byte unwanted, String name) Ensures that the array does not containunwanted
.isSorted()
Ensures that the array is sorted by its natural ordering.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, length
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
-
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 orname
are nullIllegalArgumentException
- if:name
is emptyname
contains whitespacename
is 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 orname
are nullIllegalArgumentException
- if:name
is emptyname
contains whitespacename
is already in use by the value being validated or the validator context- the array contains
unwanted
-
isSorted
ByteArrayValidator isSorted()Ensures that the array is sorted by its natural ordering.- Returns:
- this
- Throws:
NullPointerException
- if the value is nullIllegalArgumentException
- if the array is not sorted- See Also:
-