|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.googlecode.kevinarpe.papaya.argument.DateTimeArrayArgs
public class DateTimeArrayArgs
Static methods to check DateTime[] arguments.
See ObjectArgs for an overview.
| Method Summary | |
|---|---|
static DateTime[] |
checkExactValue(DateTime[] arr,
DateTime exactValue,
String arrArgName)
Tests if all values in an array have an exact value. |
static DateTime[] |
checkMaxValue(DateTime[] arr,
DateTime maxValue,
String arrArgName)
Tests if all values in an array have a maximum value. |
static DateTime[] |
checkMinValue(DateTime[] arr,
DateTime minValue,
String arrArgName)
Tests if all values in an array have a minimum value. |
static DateTime[] |
checkNotExactValue(DateTime[] arr,
DateTime exactValue,
String arrArgName)
Tests if all values in an array do not have an exact value. |
static DateTime[] |
checkValueInsideRange(DateTime[] arr,
DateTime minRangeValue,
DateTime maxRangeValue,
String arrArgName)
Tests if all values in an array are within specified range. |
static DateTime[] |
checkValueOutsideRange(DateTime[] arr,
DateTime minRangeValue,
DateTime maxRangeValue,
String arrArgName)
Tests if all values in an array are not within specified range. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
@FullyTested
public static DateTime[] checkValueInsideRange(DateTime[] arr,
DateTime minRangeValue,
DateTime maxRangeValue,
String arrArgName)
Example: All values must be >= 3 and <= 7:
checkValueInsideRange(numbersArray, 3, 7, "numbersArray");
arr - array of values to test. May be emptyminRangeValue - minimum value (inclusive) for inclusive range of each value in array to testmaxRangeValue - maximum value (inclusive) for inclusive range of each value in array to testarrArgName - argument name for arr, e.g., "valueList"
NullPointerException - if arr is null
IllegalArgumentException - minValue > maxValuearr is outside allowed rangecheckValueInsideRange(DateTime[], DateTime, DateTime, String),
DateTimeIterableArgs.checkValueInsideRange(Iterable, DateTime, DateTime, String)
@FullyTested
public static DateTime[] checkValueOutsideRange(DateTime[] arr,
DateTime minRangeValue,
DateTime maxRangeValue,
String arrArgName)
Example: All values must be <= 3 and >= 7:
checkValueInsideRange(numbersArray, 4, 6, "numbersArray");
arr - array of values to test. May be emptyminRangeValue - minimum value (inclusive) for exclusive range of each value in array to testmaxRangeValue - maximum value (inclusive) for exclusive range of each value in array to testarrArgName - argument name for arr, e.g., "valueList"
NullPointerException - if arr is null
IllegalArgumentException - minValue > maxValuearr is inside not-allowed rangecheckValueOutsideRange(DateTime[], DateTime, DateTime, String),
DateTimeIterableArgs.checkValueOutsideRange(Iterable, DateTime, DateTime, String)
@FullyTested
public static DateTime[] checkMinValue(DateTime[] arr,
DateTime minValue,
String arrArgName)
arr - array of values to test. May be emptyminValue - minimum value (inclusive)arrArgName - argument name for arr, e.g., "valueList"
NullPointerException - if arr is null
IllegalArgumentException - if any value of arr is less than minValuecheckMinValue(DateTime[], DateTime, String),
DateTimeIterableArgs.checkMinValue(Iterable, DateTime, String)
@FullyTested
public static DateTime[] checkMaxValue(DateTime[] arr,
DateTime maxValue,
String arrArgName)
arr - array of values to test. May be emptymaxValue - maximum value (inclusive)arrArgName - argument name for arr, e.g., "valueList"
NullPointerException - if arr is null
IllegalArgumentException - if any value of arr is greater than maxValuecheckMaxValue(DateTime[], DateTime, String),
DateTimeIterableArgs.checkMaxValue(Iterable, DateTime, String)
@FullyTested
public static DateTime[] checkExactValue(DateTime[] arr,
DateTime exactValue,
String arrArgName)
arr - array of values to test. May be emptyexactValue - expected valuearrArgName - argument name for arr, e.g., "valueList"
NullPointerException - if arr is null
IllegalArgumentException - if any value of arr is not exactValuecheckExactValue(DateTime[], DateTime, String),
DateTimeIterableArgs.checkExactValue(Iterable, DateTime, String)
@FullyTested
public static DateTime[] checkNotExactValue(DateTime[] arr,
DateTime exactValue,
String arrArgName)
arr - array of values to test. May be emptyexactValue - expected valuearrArgName - argument name for arr, e.g., "valueList"
NullPointerException - if arr (or any element) is null
IllegalArgumentException - if any value of arr is exactValuecheckNotExactValue(DateTime[], DateTime, String),
DateTimeIterableArgs.checkNotExactValue(Iterable, DateTime, String)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||