![]() |
Adventure at Umalu
22nd March, 2013
Rogue-like Dungeon Crawler, written in Java
|
Static Public Member Functions | |
static void | argumentIsNotNull (Object argument) |
static void | argumentsAreNotNull (Object...arguments) |
static void | argumentIsPositive (int argument) |
static void | argumentsArePositive (int...arguments) |
static void | argumentIsNonNegative (int argument) |
static void | argumentsAreNonNegative (int...arguments) |
static void | argumentInsideBound (int argument, int max) |
static void | argumentsInsideBounds (int x, int y, int width, int height) |
static void | verifyState (boolean condition) |
static void | validateArgument (boolean condition) |
static< T > T | returnNonNull (T value) |
A collection of methods meant to help check method preconditions and postconditions.
|
static |
Throws an
if the supplied bound is not between 0 (inclusive) and max (exclusive).
argument | the argument being tested |
max | the upper bound (exclusive) of the argument |
|
static |
Throws an
if the supplied argument is negative integer. In other words, the argument must be in the set {0, 1, 2,3, ...}, or the set of all positive integers.
argument | the argument being tested |
|
static |
Throws an
if the supplied argument is null.
argument | the argument being tested |
|
static |
Throws an
if the supplied argument is not a positive integer. In other words, the argument must be in the set {1, 2,3, ...}, or the set of all natural numbers.
argument | the argument being tested |
|
static |
Throws an
if any of the supplied arguments are a negative integer. In other words, each argument must be in the set {0, 1, 2,3, ...}, or the set of all positive integer.
arguments | the arguments being tested |
|
static |
Throws an
if any of the supplied arguments is null.
arguments | the arguments being tested |
|
static |
Throws an
if any of the supplied arguments are not a positive integer. In other words, each argument must be in the set {1, 2,3, ...}, or the set of all natural numbers.
arguments | the arguments being tested |
|
static |
Throws an
if the supplied (x, y) coordinate is not between inside the given bounds. In other words, x and y must be non-negative integers, with x less than width, and y less than height.
x | the x location being tested |
y | the y location being tested |
width | the upper bound (exclusive) of x |
height | the upper bound (exclusive) of y. |
|
static |
Returns the given return value if it is not null. Otherwise, an
is thrown. The typical usage would be as the return statement in another method (eg
).
<T> | the type of the value being tested for non-null |
value | the value being returned and tested for non-null |
|
static |
Throws an
if the given condition is not true.
condition | the state being tested |
|
static |
Throws an
if the given condition is not true.
condition | the state being tested |