com.acsinet_solutions.util.build
Class Checks

java.lang.Object
  extended by com.acsinet_solutions.util.build.Checks

public final class Checks
extends java.lang.Object

Build checking utility methods

Author:
Santiago Arriaga

Constructor Summary
Checks()
           
 
Method Summary
static void checkNotEmpty(java.lang.String field, java.util.Collection list)
          Check the given List is not empty.
static void checkNotEmpty(java.lang.String field, java.util.Map map)
          Check the given Map is not empty.
static void checkNotEmpty(java.lang.String field, java.lang.String str)
          Check the given str is not empty.
static void checkNotNull(java.lang.String field, java.lang.Object obj)
          Check the given Object is not null.
static void checkNotNullOrEmpty(java.lang.String field, java.util.Collection collection)
          Check the given Collection is not null or empty.
static void checkNotNullOrEmpty(java.lang.String field, java.lang.String str)
          Check the given String is not null or empty.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Checks

public Checks()
Method Detail

checkNotEmpty

public static void checkNotEmpty(java.lang.String field,
                                 java.lang.String str)
                          throws BuildException
Check the given str is not empty. Report empty fields.

Parameters:
field - The not-null name of the field
str - The not-null String instance to test
Throws:
BuildException - Thrown if the test failed

checkNotEmpty

public static void checkNotEmpty(java.lang.String field,
                                 java.util.Collection list)
                          throws BuildException
Check the given List is not empty. Report empty fields.

Parameters:
field - The not-null name of the field
list - The not-null List instance to test
Throws:
BuildException - Thrown if the test failed

checkNotEmpty

public static void checkNotEmpty(java.lang.String field,
                                 java.util.Map map)
                          throws BuildException
Check the given Map is not empty. Report empty fields.

Parameters:
field - The not-null name of the field
map - The not-null Map instance to test
Throws:
BuildException - Thrown if the test failed

checkNotNull

public static void checkNotNull(java.lang.String field,
                                java.lang.Object obj)
                         throws BuildException
Check the given Object is not null. Report null fields.

Parameters:
field - The not-null name of the field
obj - The not-null Object instance to test
Throws:
BuildException - Thrown if the test failed

checkNotNullOrEmpty

public static void checkNotNullOrEmpty(java.lang.String field,
                                       java.lang.String str)
                                throws BuildException
Check the given String is not null or empty. Report null or empty fields.

Parameters:
field - The not-null name of the field
obj - The String reference to test
Throws:
BuildException - Thrown if the test failed

checkNotNullOrEmpty

public static void checkNotNullOrEmpty(java.lang.String field,
                                       java.util.Collection collection)
                                throws BuildException
Check the given Collection is not null or empty. Report null or empty fields.

Parameters:
field - The not-null name of the field
obj - The String reference to test
Throws:
BuildException - Thrown if the test failed