|
ShrinkWrap Resolver Maven Implementation 2.0.0-alpha-2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.shrinkwrap.resolver.impl.maven.util.Validate
public final class Validate
Validate Validation utility
| Method Summary | |
|---|---|
static boolean |
isNullOrEmpty(String string)
Checks that the specified String is not null or empty. |
static void |
isReadable(File path,
String message)
Checks that the specified String is not null or empty and represents a readable file, throws exception if it is empty or null and does not represent a path to a file. |
static void |
isReadable(String path,
String message)
Checks that the specified String is not null or empty and represents a readable file, throws exception if it is empty or null and does not represent a path to a file. |
static void |
isWriteableDirectory(String path,
String message)
Checks that the specified String is not null or empty and represents a writeable directory, throws exception if it is empty or null and does not represent a path to a directory. |
static void |
notEmpty(Collection<?> collection,
String message)
Checks that collection is not null or empty, throws exception if it is. |
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. |
static void |
stateNotNull(Object obj,
String message)
Checks that object is not null, 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 |
|---|
public static void notNull(Object obj,
String message)
throws IllegalArgumentException
obj - The object to checkmessage - The exception message
IllegalArgumentException - Thrown if obj is null
public static void stateNotNull(Object obj,
String message)
throws IllegalStateException
obj - The object to checkmessage - The exception message
IllegalStateException - Thrown if obj is null
public static void notEmpty(Collection<?> collection,
String message)
throws IllegalArgumentException
null or empty, throws exception if it is.
collection - The collection to be checkedmessage - The exception message
IllegalArgumentException - Thrown if collection is null or emptypublic static boolean isNullOrEmpty(String string)
string - The object to checkmessage - The exception message
true if specified String is null or empty, false otherwise
public static void notNullOrEmpty(String string,
String message)
throws IllegalArgumentException
string - The object to checkmessage - The exception message
IllegalArgumentException - Thrown if string is null
public static void isReadable(String path,
String message)
throws IllegalArgumentException
path - The path to checkmessage - The exception message
IllegalArgumentException - Thrown if path is empty, null or invalid
public static void isReadable(File path,
String message)
throws IllegalArgumentException
path - The path to checkmessage - The exception message
IllegalArgumentException - Thrown if path is empty, null or invalid
public static void isWriteableDirectory(String path,
String message)
throws IllegalArgumentException
path - The path to checkmessage - The exception message
IllegalArgumentException - Thrown if path is empty, null or invalid
public static void notNullAndNoNullValues(Object[] objects,
String message)
objects - The object to checkmessage - The exception message
|
ShrinkWrap Resolver Maven Implementation 2.0.0-alpha-2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||