| Constructor and Description |
|---|
Argument() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends Comparable<? super T>> |
isInRange(T min,
T max,
T value,
String name)
Checks if the given
value argument is in the given a range. |
static <T,C extends Collection<T>> |
notEmpty(C collection,
String name)
Checks if the given
collection is not null or empty. |
static <K,V,M extends Map<K,V>> |
notEmpty(M map,
String name)
Checks if the given map is not null or empty.
|
static <T extends CharSequence> |
notEmpty(T argument,
String name)
Checks if the given
argument is not empty. |
static <T> T |
notNull(T argument,
String name)
Checks if the given
argument is not null. |
public static <T extends Comparable<? super T>> T isInRange(T min, T max, T value, String name)
value argument is in the given a range.T - the generic type of the argumentsmin - 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 argumentvalue object. This case is if the given
value is in the given range.IllegalArgumentException - when the given value is not in the given range.public static <T,C extends Collection<T>> C notEmpty(C collection, String name)
collection is not null or empty.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 collectioncollection object. This case is if the given
collection is not null or empty.IllegalArgumentException - when the given collection is null or empty.public static <K,V,M extends Map<K,V>> M notEmpty(M map, String name)
K - 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 collectionmap object. This case is if the given
map is not null or empty.IllegalArgumentException - when the given map is null or empty.public static <T extends CharSequence> T notEmpty(T argument, String name)
argument is not empty.T - the generic type of the given argumentargument - the argumentname - the name of the given argumentargument object. This case is if the given
argument is not null or empty.IllegalArgumentException - when the given argument is null or empty.public static <T> T notNull(T argument,
String name)
argument is not null.T - the generic type of the given argumentargument - the argumentname - the name of the given argumentargument object. This case is if the given
argument is not null.IllegalArgumentException - when the given argument is null.Copyright © 2015–2019 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.