Interface JavaAssertThat
- All Known Subinterfaces:
JavaValidators
AssertionError
.-
Method Summary
Modifier and TypeMethodDescriptionthat
(boolean value) Validates the state of aboolean
.that
(boolean[] value) Validates the state of a primitiveboolean
array.Validates the state of a primitiveboolean
array.Validates the state of aboolean
.that
(byte value) Validates the state of abyte
.that
(byte[] value) Validates the state of a primitivebyte
array.Validates the state of a primitivebyte
array.Validates the state of abyte
.that
(char value) Validates the state of achar
.that
(char[] value) Validates the state of a primitivechar
array.Validates the state of a primitivechar
array.Validates the state of achar
.that
(double value) Validates the state of adouble
.that
(double[] value) Validates the state of a primitivedouble
array.Validates the state of a primitivedouble
array.Validates the state of adouble
.that
(float value) Validates the state of afloat
.that
(float[] value) Validates the state of a primitivefloat
array.Validates the state of a primitivefloat
array.Validates the state of afloat
.that
(int value) Validates the state of anint
.that
(int[] value) Validates the state of a primitiveint
array.Validates the state of a primitiveint
array.Validates the state of anint
.that
(long value) Validates the state of along
.that
(long[] value) Validates the state of a primitivelong
array.Validates the state of a primitivelong
array.Validates the state of along
.that
(short value) Validates the state of ashort
.that
(short[] value) Validates the state of a primitiveshort
array.Validates the state of a primitiveshort
array.Validates the state of ashort
.<T> GenericTypeValidator
<T> that
(GenericType<T> value) Validates the state of aClass
.<T> GenericTypeValidator
<T> that
(GenericType<T> value, String name) Validates the state of aClass
.<E> ObjectArrayValidator
<E[], E> that
(E[] value) Validates the state of anObject
array.<E> ObjectArrayValidator
<E[], E> Validates the state of anObject
array.Validates the state of aBoolean
.Validates the state of aBoolean
.Validates the state of aByte
.Validates the state of aByte
.Validates the state of aCharacter
.Validates the state of aCharacter
.<T> GenericTypeValidator
<T> Validates the state of aClass
.<T> GenericTypeValidator
<T> Validates the state of aClass
.Validates the state of aDouble
.Validates the state of aDouble
.Validates the state of aFloat
.Validates the state of aFloat
.Validates the state of anInteger
.Validates the state of anInteger
.Validates the state of aLong
.Validates the state of aLong
.Validates the state of aShort
.Validates the state of aShort
.Validates the state of aString
.Validates the state of aString
.that
(BigDecimal value) Validates the state of aBigDecimal
.that
(BigDecimal value, String name) Validates the state of aBigDecimal
.that
(BigInteger value) Validates the state of aBigInteger
.that
(BigInteger value, String name) Validates the state of aBigInteger
.that
(InetAddress value) Validates the state of anInetAddress
.that
(InetAddress value, String name) Validates the state of anInetAddress
.Validates the state of aURI
.Validates the state of aURI
.Validates the state of aPath
.Validates the state of aPath
.<T> OptionalValidator
<T> Validates the state of anOptional
.<T> OptionalValidator
<T> Validates the state of anOptional
.<T extends Comparable<T>>
ComparableValidator<T> that
(T value) Validates the state of aComparable
object.<T extends Comparable<T>>
ComparableValidator<T> Validates the state of aComparable
object.
-
Method Details
-
that
Validates the state of abyte
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace, or is empty
-
that
Validates the state of abyte
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of aByte
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace, or is empty
-
that
Validates the state of aByte
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of ashort
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace, or is empty
-
that
Validates the state of ashort
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of aShort
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace, or is empty
-
that
Validates the state of aShort
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of anint
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of anint
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of anInteger
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of anInteger
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of along
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of along
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of aLong
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of aLong
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of afloat
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of afloat
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of aFloat
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of aFloat
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of adouble
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of adouble
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of aDouble
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of aDouble
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of aboolean
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of aboolean
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of aBoolean
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of aBoolean
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of achar
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of achar
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of aCharacter
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of aCharacter
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of aBigInteger
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of aBigInteger
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of aBigDecimal
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of aBigDecimal
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of aComparable
object.- Type Parameters:
T
- the type of the value- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of aComparable
object.- Type Parameters:
T
- the type of the value- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of anObject
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Type Parameters:
T
- the type of the value- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of anObject
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Type Parameters:
T
- the type of the value- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of aCollection
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Type Parameters:
T
- the type of the valueE
- the type of elements in the collection- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of aCollection
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Type Parameters:
T
- the type of the valueE
- the type of elements in the collection- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of aList
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Type Parameters:
T
- the type of the valueE
- the type of elements in the list- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of aList
.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Type Parameters:
T
- the type of the valueE
- the type of elements in the list- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of a primitivebyte
array.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of a primitivebyte
array.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of a primitiveshort
array.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of a primitiveshort
array.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of a primitiveint
array.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of a primitiveint
array.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of a primitivelong
array.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of a primitivelong
array.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of a primitivefloat
array.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of a primitivefloat
array.The returned validator captures exceptions on validation failure rather than throwing them immediately. The exceptions are converted into an
AssertionError
and can be retrieved or thrown once the validation completes. Exceptions unrelated to validation failures are thrown immediately.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of a primitivedouble
array.The returned validator throws an exception immediately if a validation fails. This exception is then converted into an
AssertionError
. Exceptions unrelated to validation failures are not converted.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of a primitivedouble
array.The returned validator throws an exception immediately if a validation fails. This exception is then converted into an
AssertionError
. Exceptions unrelated to validation failures are not converted.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of a primitiveboolean
array.The returned validator throws an exception immediately if a validation fails. This exception is then converted into an
AssertionError
. Exceptions unrelated to validation failures are not converted.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of a primitiveboolean
array.The returned validator throws an exception immediately if a validation fails. This exception is then converted into an
AssertionError
. Exceptions unrelated to validation failures are not converted.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of a primitivechar
array.The returned validator throws an exception immediately if a validation fails. This exception is then converted into an
AssertionError
. Exceptions unrelated to validation failures are not converted.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of a primitivechar
array.The returned validator throws an exception immediately if a validation fails. This exception is then converted into an
AssertionError
. Exceptions unrelated to validation failures are not converted.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of anObject
array.The returned validator throws an exception immediately if a validation fails. This exception is then converted into an
AssertionError
. Exceptions unrelated to validation failures are not converted.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Type Parameters:
E
- the type of elements in the array- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of anObject
array.The returned validator throws an exception immediately if a validation fails. This exception is then converted into an
AssertionError
. Exceptions unrelated to validation failures are not converted.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Type Parameters:
E
- the type of elements in the array- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of aMap
.The returned validator throws an exception immediately if a validation fails. This exception is then converted into an
AssertionError
. Exceptions unrelated to validation failures are not converted.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Type Parameters:
T
- the type of the mapK
- the type of keys in the mapV
- the type of values in the map- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of aMap
.The returned validator throws an exception immediately if a validation fails. This exception is then converted into an
AssertionError
. Exceptions unrelated to validation failures are not converted.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Type Parameters:
T
- the type of the mapK
- the type of keys in the mapV
- the type of values in the map- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of aPath
.The returned validator throws an exception immediately if a validation fails. This exception is then converted into an
AssertionError
. Exceptions unrelated to validation failures are not converted.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of aPath
.The returned validator throws an exception immediately if a validation fails. This exception is then converted into an
AssertionError
. Exceptions unrelated to validation failures are not converted.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of aString
.The returned validator throws an exception immediately if a validation fails. This exception is then converted into an
AssertionError
. Exceptions unrelated to validation failures are not converted.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of aString
.The returned validator throws an exception immediately if a validation fails. This exception is then converted into an
AssertionError
. Exceptions unrelated to validation failures are not converted.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of aURI
.The returned validator throws an exception immediately if a validation fails. This exception is then converted into an
AssertionError
. Exceptions unrelated to validation failures are not converted.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of aURI
.The returned validator throws an exception immediately if a validation fails. This exception is then converted into an
AssertionError
. Exceptions unrelated to validation failures are not converted.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of aClass
.The returned validator throws an exception immediately if a validation fails. This exception is then converted into an
AssertionError
. Exceptions unrelated to validation failures are not converted.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Type Parameters:
T
- the type of the class modelled by theClass
object. For types that contain type-parameters, use theTypeToken
overload.- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of aClass
.The returned validator throws an exception immediately if a validation fails. This exception is then converted into an
AssertionError
. Exceptions unrelated to validation failures are not converted.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Type Parameters:
T
- the type of the class modelled by theClass
object. For types without type-parameters, prefer theClass
overload.- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of aClass
.The returned validator throws an exception immediately if a validation fails. This exception is then converted into an
AssertionError
. Exceptions unrelated to validation failures are not converted.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Type Parameters:
T
- the type of the class modelled by theClass
object. For types that contain type-parameters, use theTypeToken
overload.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of aClass
.The returned validator throws an exception immediately if a validation fails. This exception is then converted into an
AssertionError
. Exceptions unrelated to validation failures are not converted.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Type Parameters:
T
- the type of the class modelled by theClass
object. For types without type-parameters, prefer theClass
overload.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of anOptional
.The returned validator throws an exception immediately if a validation fails. This exception is then converted into an
AssertionError
. Exceptions unrelated to validation failures are not converted.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Type Parameters:
T
- the type of optional- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of anOptional
.The returned validator throws an exception immediately if a validation fails. This exception is then converted into an
AssertionError
. Exceptions unrelated to validation failures are not converted.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Type Parameters:
T
- the type of optional- Parameters:
value
- the value- Returns:
- a validator for the value
-
that
Validates the state of anInetAddress
.The returned validator throws an exception immediately if a validation fails. This exception is then converted into an
AssertionError
. Exceptions unrelated to validation failures are not converted.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the valuename
- the name of the value- Returns:
- a validator for the value
- Throws:
NullPointerException
- ifname
is nullIllegalArgumentException
- ifname
contains whitespace or is empty
-
that
Validates the state of anInetAddress
.The returned validator throws an exception immediately if a validation fails. This exception is then converted into an
AssertionError
. Exceptions unrelated to validation failures are not converted.This method is intended to be used with the
assert
keyword, like so:assert that(value, name)
.- Parameters:
value
- the value- Returns:
- a validator for the value
-