de.danielbechler.util
Class Assert
java.lang.Object
de.danielbechler.util.Assert
public class Assert
- extends Object
- Author:
- Daniel Bechler
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
equalTypesOrNull
public static void equalTypesOrNull(Object... objects)
notNull
public static void notNull(Object object,
String name)
notEmpty
public static void notEmpty(Collection<?> collection,
String name)
notEmpty
public static void notEmpty(String text,
String name)
throws IllegalArgumentException
- Same as
hasText(String, String)
.
- Throws:
IllegalArgumentException
- See Also:
hasText(String, String)
hasText
public static void hasText(String value,
String name)
throws IllegalArgumentException
- Ensures that the given
value
contains characters.
- Parameters:
value
- The value to check.name
- The name of the variable (used for the exception message).
- Throws:
IllegalArgumentException
- If the given value is null
or doesn't contain any non-whitespace
characters.
Copyright © 2012. All Rights Reserved.