|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ninja_squad.dbsetup.util.Preconditions
public final class Preconditions
Utility class to help verifying preconditions
| Method Summary | |
|---|---|
static void |
checkArgument(boolean condition,
java.lang.String message)
Throws an IllegalARgumentException with the given message if the given condition is false. |
static void |
checkNotNull(java.lang.Object argument,
java.lang.String message)
Throws a NullPointerException with the given message if the given argument is null. |
static void |
checkState(boolean condition,
java.lang.String message)
Throws an IllegalStateException with the given message if the given condition is false. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void checkNotNull(java.lang.Object argument,
java.lang.String message)
throws java.lang.NullPointerException
null.
argument - the argument to check for nullmessage - the message of the thrown NullPointerException
java.lang.NullPointerException - if argument is null.
public static void checkState(boolean condition,
java.lang.String message)
throws java.lang.IllegalStateException
false.
condition - the condition to checkmessage - the message of the thrown IllegalStateException
java.lang.IllegalStateException - if the condition is false.
public static void checkArgument(boolean condition,
java.lang.String message)
throws java.lang.IllegalStateException
false.
condition - the condition to checkmessage - the message of the thrown IllegalArgumentException
java.lang.IllegalArgumentException - if the condition is false.
java.lang.IllegalStateException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||