ShrinkWrap Aggregator and Build Parent 1.0.0-cr-1

org.jboss.shrinkwrap.impl.base
Class Validate

java.lang.Object
  extended by org.jboss.shrinkwrap.impl.base.Validate

public final class Validate
extends Object

Validate Validation utility

Version:
$Revision: $
Author:
Aslak Knutsen

Method Summary
static void notNull(Object obj, String message)
          Checks that object is not null, throws exception if it is.
static void notNullAndNoNullValues(Object[] objects, String message)
          Checks that the specified array is not null or contain any null values.
static void notNullOrEmpty(String string, String message)
          Checks that the specified String is not null or empty, throws exception if it is.
 
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 message)
                    throws IllegalArgumentException
Checks that object is not null, throws exception if it is.

Parameters:
obj - The object to check
message - The exception message
Throws:
IllegalArgumentException - Thrown if obj is null

notNullOrEmpty

public static void notNullOrEmpty(String string,
                                  String message)
                           throws IllegalArgumentException
Checks that the specified String is not null or empty, throws exception if it is.

Parameters:
string - The object to check
message - The exception message
Throws:
IllegalArgumentException - Thrown if obj is null

notNullAndNoNullValues

public static void notNullAndNoNullValues(Object[] objects,
                                          String message)
Checks that the specified array is not null or contain any null values.

Parameters:
objects - The object to check
message - The exception message

ShrinkWrap Aggregator and Build Parent 1.0.0-cr-1

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.