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