|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.googlecode.kevinarpe.papaya.argument.DateTimeIterableArgs
public class DateTimeIterableArgs
Static methods to check Iterable<DateTime> arguments.
See ObjectArgs for an overview.
| Method Summary | ||
|---|---|---|
static
|
checkExactValue(TIterable iterable,
DateTime exactValue,
String iterableArgName)
Tests if all values in an Iterable have an exact value. |
|
static
|
checkMaxValue(TIterable iterable,
DateTime maxValue,
String iterableArgName)
Tests if all values in an Iterable have a maximum value. |
|
static
|
checkMinValue(TIterable iterable,
DateTime minValue,
String iterableArgName)
Tests if all values in an Iterable have a minimum value. |
|
static
|
checkNotExactValue(TIterable iterable,
DateTime exactValue,
String iterableArgName)
Tests if all values in an Iterable do not have an exact value. |
|
static
|
checkValueInsideRange(TIterable iterable,
DateTime minValue,
DateTime maxValue,
String iterableArgName)
Tests if all values in an Iterable are within specified range. |
|
static
|
checkValueOutsideRange(TIterable iterable,
DateTime minValue,
DateTime maxValue,
String iterableArgName)
Tests if all values in an Iterable 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 <TIterable extends Iterable<DateTime>> TIterable checkValueInsideRange(TIterable iterable,
DateTime minValue,
DateTime maxValue,
String iterableArgName)
Iterable are within specified range.
Example: All values must be >= 3 and <= 7:
checkValueInsideRange(numbersList, 3, 7, "numbersList");
iterable - iterable of values to test. May be emptyminValue - minimum value (inclusive) for inclusive range of each value in array to testmaxValue - maximum value (inclusive) for inclusive range of each value in array to testiterableArgName - argument name for iterable, e.g., "valueList"
NullPointerException - if iterable (or any element) is null
IllegalArgumentException - minValue > maxValueiterable is outside allowed rangecheckValueOutsideRange(Iterable, DateTime, DateTime, String),
DateTimeArrayArgs.checkValueInsideRange(DateTime[], DateTime, DateTime, String),
DateTimeArrayArgs.checkValueInsideRange(DateTime[], DateTime, DateTime, String)
@FullyTested
public static <TIterable extends Iterable<DateTime>> TIterable checkValueOutsideRange(TIterable iterable,
DateTime minValue,
DateTime maxValue,
String iterableArgName)
Iterable are not within specified range.
Example: All values must be <= 3 and >= 7:
checkValueInsideRange(numbersList, 4, 6, "numbersList");
iterable - iterable of values to test. May be emptyminValue - minimum value (inclusive) for inclusive range of each value in array to testmaxValue - maximum value (inclusive) for inclusive range of each value in array to testiterableArgName - argument name for iterable, e.g., "valueList"
NullPointerException - if iterable (or any element) is null
IllegalArgumentException - minValue > maxValueiterable is inside not-allowed rangecheckValueInsideRange(Iterable, DateTime, DateTime, String),
DateTimeArrayArgs.checkValueOutsideRange(DateTime[], DateTime, DateTime, String),
DateTimeArrayArgs.checkValueOutsideRange(DateTime[], DateTime, DateTime, String)
@FullyTested
public static <TIterable extends Iterable<DateTime>> TIterable checkMinValue(TIterable iterable,
DateTime minValue,
String iterableArgName)
Iterable have a minimum value.
iterable - iterable of values to test. May be emptyminValue - minimum value (inclusive)iterableArgName - argument name for iterable, e.g., "valueList"
NullPointerException - if iterable (or any element) is null
IllegalArgumentException - if any value of iterable is less than minValuecheckMaxValue(Iterable, DateTime, String),
DateTimeArrayArgs.checkMinValue(DateTime[], DateTime, String),
DateTimeArrayArgs.checkMinValue(DateTime[], DateTime, String)
@FullyTested
public static <TIterable extends Iterable<DateTime>> TIterable checkMaxValue(TIterable iterable,
DateTime maxValue,
String iterableArgName)
Iterable have a maximum value.
iterable - iterable of values to test. May be emptymaxValue - maximum value (inclusive)iterableArgName - argument name for iterable, e.g., "valueList"
NullPointerException - if iterable (or any element) is null
IllegalArgumentException - if any value of iterable is greater than maxValuecheckMinValue(Iterable, DateTime, String),
DateTimeArrayArgs.checkMaxValue(DateTime[], DateTime, String),
DateTimeArrayArgs.checkMaxValue(DateTime[], DateTime, String)
@FullyTested
public static <TIterable extends Iterable<DateTime>> TIterable checkExactValue(TIterable iterable,
DateTime exactValue,
String iterableArgName)
Iterable have an exact value.
iterable - iterable of values to test. May be emptyexactValue - expected valueiterableArgName - argument name for iterable, e.g., "valueList"
NullPointerException - if iterable (or any element) is null
IllegalArgumentException - if any value of iterable is exactValuecheckNotExactValue(Iterable, DateTime, String),
DateTimeArrayArgs.checkExactValue(DateTime[], DateTime, String),
DateTimeArrayArgs.checkExactValue(DateTime[], DateTime, String)
@FullyTested
public static <TIterable extends Iterable<DateTime>> TIterable checkNotExactValue(TIterable iterable,
DateTime exactValue,
String iterableArgName)
Iterable do not have an exact value.
iterable - iterable of values to test. May be emptyexactValue - expected valueiterableArgName - argument name for iterable, e.g., "valueList"
NullPointerException - if iterable (or any element) is null
IllegalArgumentException - if any value of iterable is exactValuecheckExactValue(Iterable, DateTime, String),
DateTimeArrayArgs.checkNotExactValue(DateTime[], DateTime, String),
DateTimeArrayArgs.checkNotExactValue(DateTime[], DateTime, String)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||