public abstract class Validate extends Object
| Constructor and Description |
|---|
Validate() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T[] |
noNullElements(T[] array,
String argument) |
static <T extends Collection> |
noNullElements(T collection,
String argumentName)
Throws IllegalArgumentException if the collection contains null elements (or is null), otherwise returns
the collection.
|
static <T extends CharSequence> |
notEmpty(T value,
String argumentName)
Throws IllegalArgumentException if the char sequence is empty, otherwise returns the char sequence.
|
static <T> T |
notNull(T value,
String argumentName)
Throws IllegalArgumentException if the value is null, otherwise returns the value.
|
public static <T> T notNull(T value,
String argumentName)
T - the type of the argumentvalue - input valueargumentName - the name of input argumentpublic static <T extends CharSequence> T notEmpty(T value, String argumentName)
T - the type of char sequencevalue - input char sequenceargumentName - the name of input argumentpublic static <T extends Collection> T noNullElements(T collection, String argumentName)
T - the type of the collectioncollection - input collectionargumentName - the name of input argumentpublic static <T> T[] noNullElements(T[] array,
String argument)
Copyright © 2014. All Rights Reserved.