|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.mines.jtk.util.Check
public class Check
Facilitates checks for common conditions. Methods in this class throw appropriate exceptions when specified conditions are not satisfied.
| Method Summary | |
|---|---|
static void |
argument(boolean condition,
java.lang.String message)
Ensures that the specified condition for an argument is true. |
static void |
index(byte[] a,
int i)
Ensures that the specified array index is in bounds. |
static void |
index(double[] a,
int i)
Ensures that the specified array index is in bounds. |
static void |
index(float[] a,
int i)
Ensures that the specified array index is in bounds. |
static void |
index(int[] a,
int i)
Ensures that the specified array index is in bounds. |
static void |
index(int n,
int i)
Ensures that the specified zero-based index is in bounds. |
static void |
index(long[] a,
int i)
Ensures that the specified array index is in bounds. |
static void |
index(short[] a,
int i)
Ensures that the specified array index is in bounds. |
static void |
state(boolean condition,
java.lang.String message)
Ensures that the specified condition of state is true. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void argument(boolean condition,
java.lang.String message)
condition - the condition.message - a description of the condition.
java.lang.IllegalArgumentException - if the condition is false.
public static void state(boolean condition,
java.lang.String message)
condition - the condition.message - a description of the condition.
java.lang.IllegalStateException - if the condition is false.
public static void index(int n,
int i)
n - the smallest positive number that is not in bounds.i - the index.
java.lang.IndexOutOfBoundsException - if index is out of bounds.
public static void index(byte[] a,
int i)
a - the array.i - the index.
java.lang.ArrayIndexOutOfBoundsException - if index is out of bounds.
public static void index(short[] a,
int i)
a - the array.i - the index.
java.lang.ArrayIndexOutOfBoundsException - if index is out of bounds.
public static void index(int[] a,
int i)
a - the array.i - the index.
java.lang.ArrayIndexOutOfBoundsException - if index is out of bounds.
public static void index(long[] a,
int i)
a - the array.i - the index.
java.lang.ArrayIndexOutOfBoundsException - if index is out of bounds.
public static void index(float[] a,
int i)
a - the array.i - the index.
java.lang.ArrayIndexOutOfBoundsException - if index is out of bounds.
public static void index(double[] a,
int i)
a - the array.i - the index.
java.lang.ArrayIndexOutOfBoundsException - if index is out of bounds.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||