|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.util.dbc.Assertions
public final class Assertions
Utility class with design by contract checks. Should be preferred to Null
.
Method Summary | |
---|---|
static Object |
equals(String name,
Object expected,
Object got)
|
static void |
not(String name,
boolean condition)
Throw an IllegalArgumentException if the condition is true |
static String |
notBlank(String name,
String string)
|
static Object |
notNull(String name,
Object notNull)
|
static Object |
stateNotNull(String name,
Object notNull)
|
static void |
stateTrue(String name,
boolean condition)
State check. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Object notNull(String name, Object notNull) throws IllegalArgumentException
IllegalArgumentException
public static String notBlank(String name, String string) throws IllegalArgumentException
IllegalArgumentException
public static void not(String name, boolean condition) throws IllegalArgumentException
name
- condition
-
IllegalArgumentException
public static void stateTrue(String name, boolean condition) throws IllegalStateException
name
- condition
-
IllegalStateException
public static Object stateNotNull(String name, Object notNull)
public static Object equals(String name, Object expected, Object got) throws IllegalArgumentException
IllegalArgumentException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |