edu.stanford.math.plex4.utility
public class ExceptionUtility extends java.lang.Object
Constructor and Description |
---|
ExceptionUtility() |
Modifier and Type | Method and Description |
---|---|
static <T> void |
verifyAllNonNull(java.util.Collection<T> collection) |
static void |
verifyClosedInterval(double value,
double lowerBound,
double upperBound) |
static void |
verifyClosedInterval(int value,
int lowerBound,
int upperBound) |
static void |
verifyEqual(double value1,
double value2) |
static void |
verifyEqual(int value1,
int value2) |
static void |
verifyFalse(boolean condition) |
static void |
verifyFalse(boolean condition,
java.lang.String message) |
static void |
verifyGreaterThan(double value1,
double value2) |
static void |
verifyGreaterThan(int value1,
int value2) |
static void |
verifyGreaterThanOrEqual(double value1,
double value2) |
static void |
verifyGreaterThanOrEqual(int value1,
int value2) |
static void |
verifyIndex(int upperBound,
int index)
This function checks to see if index is in the set {0, ..., upperBound - 1}.
|
static void |
verifyIndex(int lowerBound,
int upperBound,
int index)
This function checks to see if index is in the set {lowerBound, ..., upperBound - 1}.
|
static void |
verifyLeftHalfOpenInterval(double value,
double lowerBound,
double upperBound) |
static void |
verifyLessThan(double value1,
double value2) |
static void |
verifyLessThan(int value1,
int value2) |
static void |
verifyLessThanOrEqual(double value1,
double value2) |
static void |
verifyLessThanOrEqual(int value1,
int value2) |
static void |
verifyNegative(double value) |
static void |
verifyNegative(int value) |
static <T> void |
verifyNonEmpty(java.util.Collection<T> collection) |
static <T> void |
verifyNonEmpty(double[] collection) |
static <T> void |
verifyNonEmpty(int[] collection) |
static void |
verifyNonEqual(double value1,
double value2) |
static void |
verifyNonEqual(int value1,
int value2) |
static void |
verifyNonNegative(double value) |
static void |
verifyNonNegative(int value) |
static void |
verifyNonNull(java.lang.Object value) |
static void |
verifyNonPositive(double value) |
static void |
verifyNonPositive(int value) |
static void |
verifyNonZero(double value) |
static void |
verifyNonZero(int value) |
static void |
verifyOpenInterval(double value,
double lowerBound,
double upperBound) |
static void |
verifyPositive(double value) |
static void |
verifyPositive(int value) |
static void |
verifyRightHalfOpenInterval(double value,
double lowerBound,
double upperBound) |
static void |
verifyTrue(boolean condition) |
static void |
verifyTrue(boolean condition,
java.lang.String message) |
public static void verifyIndex(int lowerBound, int upperBound, int index)
lowerBound
- the minimum allowable value of indexupperBound
- one past the maximum allowable value of indexindex
- the index to checkpublic static void verifyIndex(int upperBound, int index)
upperBound
- one past the maximum allowable value of indexindex
- the index to checkpublic static void verifyNonNull(java.lang.Object value)
public static <T> void verifyAllNonNull(java.util.Collection<T> collection)
public static <T> void verifyNonEmpty(java.util.Collection<T> collection)
public static <T> void verifyNonEmpty(int[] collection)
public static <T> void verifyNonEmpty(double[] collection)
public static void verifyEqual(int value1, int value2)
public static void verifyNonEqual(int value1, int value2)
public static void verifyLessThan(int value1, int value2)
public static void verifyGreaterThan(int value1, int value2)
public static void verifyLessThanOrEqual(int value1, int value2)
public static void verifyGreaterThanOrEqual(int value1, int value2)
public static void verifyPositive(int value)
public static void verifyNonNegative(int value)
public static void verifyNegative(int value)
public static void verifyNonPositive(int value)
public static void verifyNonZero(int value)
public static void verifyClosedInterval(int value, int lowerBound, int upperBound)
public static void verifyEqual(double value1, double value2)
public static void verifyNonEqual(double value1, double value2)
public static void verifyLessThan(double value1, double value2)
public static void verifyGreaterThan(double value1, double value2)
public static void verifyLessThanOrEqual(double value1, double value2)
public static void verifyGreaterThanOrEqual(double value1, double value2)
public static void verifyPositive(double value)
public static void verifyNonNegative(double value)
public static void verifyNegative(double value)
public static void verifyNonPositive(double value)
public static void verifyNonZero(double value)
public static void verifyClosedInterval(double value, double lowerBound, double upperBound)
public static void verifyOpenInterval(double value, double lowerBound, double upperBound)
public static void verifyLeftHalfOpenInterval(double value, double lowerBound, double upperBound)
public static void verifyRightHalfOpenInterval(double value, double lowerBound, double upperBound)
public static void verifyTrue(boolean condition)
public static void verifyFalse(boolean condition)
public static void verifyTrue(boolean condition, java.lang.String message)
public static void verifyFalse(boolean condition, java.lang.String message)