org.rundeck.api.util
Class AssertUtil

java.lang.Object
  extended by org.rundeck.api.util.AssertUtil

public class AssertUtil
extends Object

Utility class for assertions

Author:
Vincent Behar

Constructor Summary
AssertUtil()
           
 
Method Summary
static void notBlank(String input, String errorMessage)
          Test if the given String is blank (null, empty or only whitespace)
static void notNull(Object object, String errorMessage)
          Test if the given Object is null
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssertUtil

public AssertUtil()
Method Detail

notNull

public static void notNull(Object object,
                           String errorMessage)
                    throws IllegalArgumentException
Test if the given Object is null

Parameters:
object -
errorMessage - to be used if the object is null
Throws:
IllegalArgumentException - if the given object is null

notBlank

public static void notBlank(String input,
                            String errorMessage)
                     throws IllegalArgumentException
Test if the given String is blank (null, empty or only whitespace)

Parameters:
input - string
errorMessage - to be used if the string is blank
Throws:
IllegalArgumentException - if the given string is blank


Copyright © 2011. All Rights Reserved.