com.atlassian.crowd.util
Class Assert

java.lang.Object
  extended by com.atlassian.crowd.util.Assert

public class Assert
extends java.lang.Object


Constructor Summary
Assert()
           
 
Method Summary
static void notBlank(java.lang.String string)
          Assert that a string is not blank.
static void notNull(java.lang.Object object)
          Assert that an object is not null .
static void notNull(java.lang.Object object, java.lang.String message)
          Assert that an object is not null .
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Assert

public Assert()
Method Detail

notNull

public static void notNull(java.lang.Object object,
                           java.lang.String message)
Assert that an object is not null .
Assert.notNull(clazz, "The class must not be null");

Parameters:
object - the object to check
message - the exception message to use if the assertion fails
Throws:
java.lang.IllegalArgumentException - if the object is null

notNull

public static void notNull(java.lang.Object object)
                    throws java.lang.IllegalArgumentException
Assert that an object is not null .
Assert.notNull(clazz, "The class must not be null");

Parameters:
object - the object to check
Throws:
java.lang.IllegalArgumentException - if the object is null

notBlank

public static void notBlank(java.lang.String string)
                     throws java.lang.IllegalArgumentException
Assert that a string is not blank.

Parameters:
string - the string to check
Throws:
java.lang.IllegalArgumentException - if the object is blank


Copyright © 2010 Atlassian. All Rights Reserved.