org.openwms.core.util.validation
Class AssertUtils

java.lang.Object
  extended by org.openwms.core.util.validation.AssertUtils

public final class AssertUtils
extends Object

A AssertUtils. Simple utility class to encapsulate some assert methods

Since:
0.1
Version:
$Revision: 1502 $
Author:
Heiko Scherrer

Method Summary
static void isNotEmpty(String str)
          Asserts that the String str is not null and not empty.
static void isNotEmpty(String str, String message)
          Asserts that the String str is not null and not empty.
static void notNull(Object obj)
          Asserts that obj is not null .
static void notNull(Object obj, String msg)
          Asserts that obj is not null .
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

notNull

public static void notNull(Object obj,
                           String msg)
Asserts that obj is not null .

Parameters:
obj - the Object to be checked
msg - the message in case of failure
Throws:
IllegalArgumentException - if obj is null

notNull

public static void notNull(Object obj)
Asserts that obj is not null .

Parameters:
obj - the Object to be checked
Throws:
IllegalArgumentException - if obj is null

isNotEmpty

public static void isNotEmpty(String str,
                              String message)
Asserts that the String str is not null and not empty.

Parameters:
str - the String to be checked
message - the message in case of failure
Throws:
IllegalArgumentException - if str is null or empty
See Also:
String.isEmpty()

isNotEmpty

public static void isNotEmpty(String str)
Asserts that the String str is not null and not empty.

Parameters:
str - the String to check
Throws:
IllegalArgumentException - if str is null or empty
See Also:
String.isEmpty()


Copyright © 2005-2011 openwms.org. All Rights Reserved.