public class Check
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
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.
|
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.