|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fuin.objects4j.Contract
public final class Contract
Utility class for assertions on objects.
| Method Summary | |
|---|---|
static void |
requireArgNotNull(String name,
Object value)
Checks if the value is not null. |
static void |
requireValid(Object value)
Checks if the given value is valid. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void requireArgNotNull(String name,
Object value)
throws ContractViolationException
name - Name of the value for a possible error message.value - Value to check.
ContractViolationException - The value was null.
public static void requireValid(Object value)
throws ContractViolationException
value - Value to check.
ContractViolationException - The value is invalid.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||