public class Check extends Object implements Serializable
| Modifier and Type | Method and Description |
|---|---|
static Check |
get()
Gets the single Check instance.
|
Check |
isInRange(Double min,
Double max,
Double value,
String name)
Checks if the given argument is in the given a range.
|
Check |
isInRange(Float min,
Float max,
Float value,
String name)
Checks if the given argument is in the given a range.
|
Check |
isInRange(Integer min,
Integer max,
Integer value,
String name)
Checks if the given argument is in the given a range.
|
Check |
isInRange(Long min,
Long max,
Long value,
String name)
Checks if the given argument is in the given a range.
|
<T,C extends Collection<T>> |
notEmpty(C collection,
String name)
Checks if the given collection is not null or empty.
|
<T,K,V,M extends Map<K,V>> |
notEmpty(M map,
String name)
Checks if the given map is not null or empty.
|
<T extends CharSequence> |
notEmpty(T argument,
String name)
Checks if the given argument is not empty.
|
<T> Check |
notNull(T argument,
String name)
Checks if the given argument is not null.
|
public static Check get()
public <T> Check notNull(T argument, String name)
T - the generic type of the given argumentargument - the argumentname - the name of the given argumentIllegalArgumentException - when the given argument is null.public <T extends CharSequence> Check notEmpty(T argument, String name)
T - the generic type of the given argumentargument - the argumentname - the name of the given argumentIllegalArgumentException - when the given argument is null or empty.public <T,C extends Collection<T>> Check notEmpty(C collection, String name)
T - the generic type of the elements in the given collectionC - the generic type of the given collectioncollection - the collection to checkname - the name of the given collectionIllegalArgumentException - when the given collection is null or empty.public <T,K,V,M extends Map<K,V>> Check notEmpty(M map, String name)
T - the generic type of the elements in the given collectionK - the generic type of the key from the given MapV - the generic type of the value from the given MapM - the generic type of the given Mapmap - the map to checkname - the name of the given collectionIllegalArgumentException - when the given map is null or empty.public Check isInRange(Integer min, Integer max, Integer value, String name)
min - The minimum from the range to check.max - The maximum from the range to check.value - The value to check if it is in the given range.name - the name of the given argumentargument is in the given range.IllegalArgumentException - when the given argument is not in the given range.public Check isInRange(Long min, Long max, Long value, String name)
min - The minimum from the range to check.max - The maximum from the range to check.value - The value to check if it is in the given range.name - the name of the given argumentargument is in the given range.IllegalArgumentException - when the given argument is not in the given range.public Check isInRange(Float min, Float max, Float value, String name)
min - The minimum from the range to check.max - The maximum from the range to check.value - The value to check if it is in the given range.name - the name of the given argumentargument is in the given range.IllegalArgumentException - when the given argument is not in the given range.public Check isInRange(Double min, Double max, Double value, String name)
min - The minimum from the range to check.max - The maximum from the range to check.value - The value to check if it is in the given range.name - the name of the given argumentargument is in the given range.IllegalArgumentException - when the given argument is not in the given range.Copyright © 2007–2015 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.