org.springjutsu.validation.util
Class ValidationRulesUtils

java.lang.Object
  extended by org.springjutsu.validation.util.ValidationRulesUtils

public class ValidationRulesUtils
extends Object

Holds common functions, mostly to determine some traits of the model being validated.

Author:
Clark Duplichien, Taylor Wicksell

Field Summary
static String DECIMAL_PATTERN
           
static int MAXDIGITSINPHONE
           
static int MINDIGITSINPHONE
           
static String URL_PATTERN
           
 
Constructor Summary
ValidationRulesUtils()
           
 
Method Summary
static int getLength(Object object)
          returns the "length" of an object; really, it's the length of the string representation.
static boolean isEmpty(Object object)
          test if the argument is empty using a null check and a string length check.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DECIMAL_PATTERN

public static final String DECIMAL_PATTERN
See Also:
Constant Field Values

URL_PATTERN

public static final String URL_PATTERN
See Also:
Constant Field Values

MINDIGITSINPHONE

public static final int MINDIGITSINPHONE
See Also:
Constant Field Values

MAXDIGITSINPHONE

public static final int MAXDIGITSINPHONE
See Also:
Constant Field Values
Constructor Detail

ValidationRulesUtils

public ValidationRulesUtils()
Method Detail

getLength

public static int getLength(Object object)
returns the "length" of an object; really, it's the length of the string representation.

Parameters:
object - the object to determine length of.
Returns:
length of object

isEmpty

public static boolean isEmpty(Object object)
test if the argument is empty using a null check and a string length check.

Parameters:
object - the object to test
Returns:
true if the object is empty


Copyright © 2013 Spring Jutsu. All Rights Reserved.