Class Validate

java.lang.Object
com.twelvemonkeys.lang.Validate

public final class Validate extends Object
Kind of like 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.

Version:
$Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-core/src/main/java/com/twelvemonkeys/lang/Validate.java#1 $
Author:
Harald Kuhr, last modified by $Author: haku $
  • Method Details

    • notNull

      public static <T> T notNull(T pParameter)
    • notNull

      public static <T> T notNull(T pParameter, String pParamName)
    • notEmpty

      public static <T extends CharSequence> T notEmpty(T pParameter)
    • notEmpty

      public static <T extends CharSequence> T notEmpty(T pParameter, String pParamName)
    • notEmpty

      public static <T> T[] notEmpty(T[] pParameter)
    • notEmpty

      public static <T> T[] notEmpty(T[] pParameter, String pParamName)
    • notEmpty

      public static <T> Collection<T> notEmpty(Collection<T> pParameter)
    • notEmpty

      public static <T> Collection<T> notEmpty(Collection<T> pParameter, String pParamName)
    • notEmpty

      public static <K, V> Map<K,V> notEmpty(Map<K,V> pParameter)
    • notEmpty

      public static <K, V> Map<K,V> notEmpty(Map<K,V> pParameter, String pParamName)
    • noNullElements

      public static <T> T[] noNullElements(T[] pParameter)
    • noNullElements

      public static <T> T[] noNullElements(T[] pParameter, String pParamName)
    • noNullElements

      public static <T> Collection<T> noNullElements(Collection<T> pParameter)
    • noNullElements

      public static <T> Collection<T> noNullElements(Collection<T> pParameter, String pParamName)
    • noNullValues

      public static <K, V> Map<K,V> noNullValues(Map<K,V> pParameter)
    • noNullValues

      public static <K, V> Map<K,V> noNullValues(Map<K,V> pParameter, String pParamName)
    • noNullKeys

      public static <K, V> Map<K,V> noNullKeys(Map<K,V> pParameter)
    • noNullKeys

      public static <K, V> Map<K,V> noNullKeys(Map<K,V> pParameter, String pParamName)
    • isTrue

      public static boolean isTrue(boolean pExpression, String pMessage)
    • isTrue

      public static <T> T isTrue(boolean condition, T value, String message)