public final class Requirements extends Object
All verifier implementations must be immutable and final.
| Modifier and Type | Method and Description |
|---|---|
static BigDecimalRequirements |
assertThat(BigDecimal parameter,
String name)
Same as
requireThat(BigDecimal, String) but does nothing if assertions are disabled
for this class. |
static <T> ClassRequirements<T> |
assertThat(Class<T> parameter,
String name)
Same as
requireThat(Class, String) but does nothing if assertions are disabled for
this class. |
static <E> CollectionRequirements<E> |
assertThat(Collection<E> parameter,
String name)
Same as
requireThat(Collection, String) but does nothing if assertions are disabled
for this class. |
static <K,V> MapRequirements<K,V> |
assertThat(Map<K,V> parameter,
String name)
Same as
requireThat(Map, String) but does nothing if assertions are disabled for this
class. |
static ObjectRequirements<Object> |
assertThat(Object parameter,
String name)
Same as
requireThat(Object, String) but does nothing if assertions are disabled for
this class. |
static OptionalRequirements |
assertThat(Optional<?> parameter,
String name)
Same as
requireThat(Optional, String) but does nothing if assertions are disabled for
this class. |
static PathRequirements |
assertThat(Path parameter,
String name)
Same as
requireThat(Path, String) but does nothing if assertions are disabled for this
class. |
static StringRequirements |
assertThat(String parameter,
String name)
Same as
requireThat(String, String) but does nothing if assertions are disabled for
this class. |
static <T extends Comparable<? super T>> |
assertThat(T parameter,
String name)
Same as
requireThat(Comparable, String) but does nothing if assertions are disabled
for this class. |
static <T extends Number & Comparable<? super T>> |
assertThat(T parameter,
String name)
Same as
requireThat(Number, String) but does nothing if assertions are disabled for
this class. |
static UriRequirements |
assertThat(URI parameter,
String name)
Same as
requireThat(URI, String) but does nothing if assertions are disabled for this
class. |
static BigDecimalRequirements |
requireThat(BigDecimal parameter,
String name)
Creates requirements for a
BigDecimal. |
static <T> ClassRequirements<T> |
requireThat(Class<T> parameter,
String name)
Creates requirements for a
Class. |
static <E> CollectionRequirements<E> |
requireThat(Collection<E> parameter,
String name)
Creates requirements for a
Collection. |
static <K,V> MapRequirements<K,V> |
requireThat(Map<K,V> parameter,
String name)
Creates requirements for a
Map. |
static ObjectRequirements<Object> |
requireThat(Object parameter,
String name)
Creates requirements for an
Object. |
static OptionalRequirements |
requireThat(Optional<?> parameter,
String name)
Creates requirements for an
Optional. |
static PathRequirements |
requireThat(Path parameter,
String name)
Creates requirements for a
Path. |
static StringRequirements |
requireThat(String parameter,
String name)
Creates requirements for a
String. |
static <T extends Comparable<? super T>> |
requireThat(T parameter,
String name)
Creates requirements for a
Comparable. |
static <T extends Number & Comparable<? super T>> |
requireThat(T parameter,
String name)
Creates requirements for a
Number. |
static UriRequirements |
requireThat(URI parameter,
String name)
Creates requirements for a
Uri. |
public static ObjectRequirements<Object> requireThat(Object parameter, String name) throws NullPointerException, IllegalArgumentException
Object.parameter - the value of the parametername - the name of the parameterNullPointerException - if name is nullIllegalArgumentException - if name is emptypublic static ObjectRequirements<Object> assertThat(Object parameter, String name) throws NullPointerException, IllegalArgumentException
requireThat(Object, String) but does nothing if assertions are disabled for
this class.parameter - the value of the parametername - the name of the parameterNullPointerException - if name is nullIllegalArgumentException - if name is emptypublic static <E> CollectionRequirements<E> requireThat(Collection<E> parameter, String name) throws NullPointerException, IllegalArgumentException
Collection.E - the type of element in the collectionparameter - the value of the parametername - the name of the parameterNullPointerException - if name is nullIllegalArgumentException - if name is emptypublic static <E> CollectionRequirements<E> assertThat(Collection<E> parameter, String name) throws NullPointerException, IllegalArgumentException
requireThat(Collection, String) but does nothing if assertions are disabled
for this class.E - the type of element in the collectionparameter - the value of the parametername - the name of the parameterNullPointerException - if name is nullIllegalArgumentException - if name is emptypublic static <T extends Comparable<? super T>> ComparableRequirements<T> requireThat(T parameter, String name) throws NullPointerException, IllegalArgumentException
Comparable.T - the type of objects that the parameter may be compared toparameter - the value of the parametername - the name of the parameterNullPointerException - if name is nullIllegalArgumentException - if name is emptypublic static <T extends Comparable<? super T>> ComparableRequirements<T> assertThat(T parameter, String name) throws NullPointerException, IllegalArgumentException
requireThat(Comparable, String) but does nothing if assertions are disabled
for this class.T - the type of objects that the parameter may be compared toparameter - the value of the parametername - the name of the parameterNullPointerException - if name is nullIllegalArgumentException - if name is emptypublic static <T extends Number & Comparable<? super T>> NumberRequirements<T> requireThat(T parameter, String name) throws NullPointerException, IllegalArgumentException
Number.T - the type of the numberparameter - the value of the parametername - the name of the parameterNullPointerException - if name is nullIllegalArgumentException - if name is emptypublic static <T extends Number & Comparable<? super T>> NumberRequirements<T> assertThat(T parameter, String name) throws NullPointerException, IllegalArgumentException
requireThat(Number, String) but does nothing if assertions are disabled for
this class.T - the type of the numberparameter - the value of the parametername - the name of the parameterNullPointerException - if name is nullIllegalArgumentException - if name is emptypublic static BigDecimalRequirements requireThat(BigDecimal parameter, String name) throws NullPointerException, IllegalArgumentException
BigDecimal.parameter - the value of the parametername - the name of the parameterNullPointerException - if name is nullIllegalArgumentException - if name is emptypublic static BigDecimalRequirements assertThat(BigDecimal parameter, String name) throws NullPointerException, IllegalArgumentException
requireThat(BigDecimal, String) but does nothing if assertions are disabled
for this class.parameter - the value of the parametername - the name of the parameterNullPointerException - if name is nullIllegalArgumentException - if name is emptypublic static <K,V> MapRequirements<K,V> requireThat(Map<K,V> parameter, String name) throws NullPointerException, IllegalArgumentException
Map.K - the type of key in the mapV - the type of value in the mapparameter - the value of the parametername - the name of the parameterNullPointerException - if name is nullIllegalArgumentException - if name is emptypublic static <K,V> MapRequirements<K,V> assertThat(Map<K,V> parameter, String name) throws NullPointerException, IllegalArgumentException
requireThat(Map, String) but does nothing if assertions are disabled for this
class.K - the type of key in the mapV - the type of value in the mapparameter - the value of the parametername - the name of the parameterNullPointerException - if name is nullIllegalArgumentException - if name is emptypublic static PathRequirements requireThat(Path parameter, String name) throws NullPointerException, IllegalArgumentException
Path.parameter - the value of the parametername - the name of the parameterNullPointerException - if name is nullIllegalArgumentException - if name is emptypublic static PathRequirements assertThat(Path parameter, String name) throws NullPointerException, IllegalArgumentException
requireThat(Path, String) but does nothing if assertions are disabled for this
class.parameter - the value of the parametername - the name of the parameterNullPointerException - if name is nullIllegalArgumentException - if name is emptypublic static StringRequirements requireThat(String parameter, String name) throws NullPointerException, IllegalArgumentException
String.parameter - the value of the parametername - the name of the parameterNullPointerException - if name is nullIllegalArgumentException - if name is emptypublic static StringRequirements assertThat(String parameter, String name) throws NullPointerException, IllegalArgumentException
requireThat(String, String) but does nothing if assertions are disabled for
this class.parameter - the value of the parametername - the name of the parameterNullPointerException - if name is nullIllegalArgumentException - if name is emptypublic static UriRequirements requireThat(URI parameter, String name) throws NullPointerException, IllegalArgumentException
Uri.parameter - the value of the parametername - the name of the parameterNullPointerException - if name is nullIllegalArgumentException - if name is emptypublic static UriRequirements assertThat(URI parameter, String name) throws NullPointerException, IllegalArgumentException
requireThat(URI, String) but does nothing if assertions are disabled for this
class.parameter - the value of the parametername - the name of the parameterNullPointerException - if name is nullIllegalArgumentException - if name is emptypublic static <T> ClassRequirements<T> requireThat(Class<T> parameter, String name) throws NullPointerException, IllegalArgumentException
Class.T - the type of classparameter - the value of the parametername - the name of the parameterNullPointerException - if name is nullIllegalArgumentException - if name is emptypublic static <T> ClassRequirements<T> assertThat(Class<T> parameter, String name) throws NullPointerException, IllegalArgumentException
requireThat(Class, String) but does nothing if assertions are disabled for
this class.T - the type of classparameter - the value of the parametername - the name of the parameterNullPointerException - if name is nullIllegalArgumentException - if name is emptypublic static OptionalRequirements requireThat(Optional<?> parameter, String name) throws NullPointerException, IllegalArgumentException
Optional.parameter - the value of the parametername - the name of the parameterNullPointerException - if name is nullIllegalArgumentException - if name is emptypublic static OptionalRequirements assertThat(Optional<?> parameter, String name) throws NullPointerException, IllegalArgumentException
requireThat(Optional, String) but does nothing if assertions are disabled for
this class.parameter - the value of the parametername - the name of the parameterNullPointerException - if name is nullIllegalArgumentException - if name is emptyCopyright © 2016. All rights reserved.