org.eesgmbh.gimv.shared.util
Class Validate

java.lang.Object
  extended by org.eesgmbh.gimv.shared.util.Validate

public class Validate
extends Object

A few handy validation methods that support generics.


Constructor Summary
Validate()
           
 
Method Summary
static void isFalse(boolean expression)
           
static void isFalse(boolean expression, String message)
           
static double isGreaterThan(double number, double greaterThan)
           
static double isGreaterThan(double number, double greaterThan, String message)
           
static double isLowerThan(double number, double lowerThan)
           
static double isLowerThan(double number, double lowerThan, String message)
           
static double isNegative(double number)
           
static double isNegative(double number, String message)
           
static double isNegativeOrZero(double number)
           
static double isNegativeOrZero(double number, String message)
           
static double isPositive(double number)
           
static double isPositive(double number, String message)
           
static double isPositiveOrZero(double number)
           
static double isPositiveOrZero(double number, String message)
           
static void isTrue(boolean expression)
           
static void isTrue(boolean expression, String message)
           
static String notBlank(String string)
           
static String notBlank(String string, String message)
           
static
<T> List<T>
notEmpty(List<T> list)
           
static
<T> List<T>
notEmpty(List<T> list, String message)
           
static
<T> T
notNull(T obj)
           
static
<T> T
notNull(T obj, String message)
           
static
<T> T[]
notNullForEach(T[] objs)
           
static
<T> T[]
notNullForEach(T[] objs, String message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Validate

public Validate()
Method Detail

isTrue

public static void isTrue(boolean expression)

isTrue

public static void isTrue(boolean expression,
                          String message)

isFalse

public static void isFalse(boolean expression)

isFalse

public static void isFalse(boolean expression,
                           String message)

notNull

public static <T> T notNull(T obj)

notNull

public static <T> T notNull(T obj,
                            String message)

notNullForEach

public static <T> T[] notNullForEach(T[] objs)

notNullForEach

public static <T> T[] notNullForEach(T[] objs,
                                     String message)

notEmpty

public static <T> List<T> notEmpty(List<T> list)

notEmpty

public static <T> List<T> notEmpty(List<T> list,
                                   String message)

notBlank

public static String notBlank(String string)

notBlank

public static String notBlank(String string,
                              String message)

isPositive

public static double isPositive(double number)

isPositive

public static double isPositive(double number,
                                String message)

isPositiveOrZero

public static double isPositiveOrZero(double number)

isPositiveOrZero

public static double isPositiveOrZero(double number,
                                      String message)

isNegative

public static double isNegative(double number)

isNegative

public static double isNegative(double number,
                                String message)

isNegativeOrZero

public static double isNegativeOrZero(double number)

isNegativeOrZero

public static double isNegativeOrZero(double number,
                                      String message)

isGreaterThan

public static double isGreaterThan(double number,
                                   double greaterThan)

isGreaterThan

public static double isGreaterThan(double number,
                                   double greaterThan,
                                   String message)

isLowerThan

public static double isLowerThan(double number,
                                 double lowerThan)

isLowerThan

public static double isLowerThan(double number,
                                 double lowerThan,
                                 String message)


Copyright © 2010 - EES GmbH