public final class Validate extends Object
org.apache.commons.lang.Validate
. Just smarter. ;-)
Uses type parameterized return values, thus making it possible to check
constructor arguments before
they are passed on to super
or this
type constructors.Modifier and Type | Method and Description |
---|---|
static boolean |
isTrue(boolean pExpression,
String pMessage) |
static <T> T |
isTrue(boolean condition,
T value,
String message) |
static <T> Collection<T> |
noNullElements(Collection<T> pParameter) |
static <T> Collection<T> |
noNullElements(Collection<T> pParameter,
String pParamName) |
static <T> T[] |
noNullElements(T[] pParameter) |
static <T> T[] |
noNullElements(T[] pParameter,
String pParamName) |
static <K,V> Map<K,V> |
noNullKeys(Map<K,V> pParameter) |
static <K,V> Map<K,V> |
noNullKeys(Map<K,V> pParameter,
String pParamName) |
static <K,V> Map<K,V> |
noNullValues(Map<K,V> pParameter) |
static <K,V> Map<K,V> |
noNullValues(Map<K,V> pParameter,
String pParamName) |
static <T> Collection<T> |
notEmpty(Collection<T> pParameter) |
static <T> Collection<T> |
notEmpty(Collection<T> pParameter,
String pParamName) |
static <K,V> Map<K,V> |
notEmpty(Map<K,V> pParameter) |
static <K,V> Map<K,V> |
notEmpty(Map<K,V> pParameter,
String pParamName) |
static <T extends CharSequence> |
notEmpty(T pParameter) |
static <T> T[] |
notEmpty(T[] pParameter) |
static <T> T[] |
notEmpty(T[] pParameter,
String pParamName) |
static <T extends CharSequence> |
notEmpty(T pParameter,
String pParamName) |
static <T> T |
notNull(T pParameter) |
static <T> T |
notNull(T pParameter,
String pParamName) |
public static <T> T notNull(T pParameter)
public static <T> T notNull(T pParameter, String pParamName)
public static <T extends CharSequence> T notEmpty(T pParameter)
public static <T extends CharSequence> T notEmpty(T pParameter, String pParamName)
public static <T> T[] notEmpty(T[] pParameter)
public static <T> T[] notEmpty(T[] pParameter, String pParamName)
public static <T> Collection<T> notEmpty(Collection<T> pParameter)
public static <T> Collection<T> notEmpty(Collection<T> pParameter, String pParamName)
public static <T> T[] noNullElements(T[] pParameter)
public static <T> T[] noNullElements(T[] pParameter, String pParamName)
public static <T> Collection<T> noNullElements(Collection<T> pParameter)
public static <T> Collection<T> noNullElements(Collection<T> pParameter, String pParamName)
public static boolean isTrue(boolean pExpression, String pMessage)
public static <T> T isTrue(boolean condition, T value, String message)
Copyright © 2017. All rights reserved.