|
||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||
| Packages that use Check | |
|---|---|
| net.sf.staccatocommons.check | This packages contains a generic validation system for fail-fast programming. |
| Uses of Check in net.sf.staccatocommons.check |
|---|
| Subclasses of Check in net.sf.staccatocommons.check | |
|---|---|
class |
Validate<ExceptionType extends Throwable>
Validate is a generic Check that on failure will throw a and
exception of a parameterized class. |
| Methods in net.sf.staccatocommons.check that return Check | ||
|---|---|---|
|
Check.contains(String varName,
ContainsAware<T> var,
T element)
Checks that the variable contains the given element |
|
|
Check.isBetween(String varName,
T var,
T min,
T max)
Checks the var is not null, less than or equal to
max and greater than or equal to min |
|
|
Check.isEmpty(String varName,
A var,
EmptyAwareType<A> type)
Checks that the variable is not null and empty |
|
Check<ExceptionType> |
Check.isEmpty(String varName,
CharSequence var)
Checks that the variable is not null and empty |
|
Check<ExceptionType> |
Check.isEmpty(String varName,
Collection<?> var)
Checks that the variable is not null and empty |
|
Check<ExceptionType> |
Check.isEmpty(String varName,
EmptyAware var)
Checks that the variable is not null and empty |
|
Check<ExceptionType> |
Check.isEmpty(String varName,
Iterable<?> var)
Checks that the variable is not null and empty |
|
Check<ExceptionType> |
Check.isEmpty(String varName,
Map<?,?> var)
Checks that the variable is not null and empty |
|
Check<ExceptionType> |
Check.isFalse(String varName,
boolean var)
Checks a that the variable is true, failing with a generated message if it is not. |
|
|
Check.isGreaterThan(String varName,
T var,
T other)
Checks that the variable is not null and > than
other |
|
|
Check.isGreaterThanOrEqualTo(String varName,
T var,
T other)
Checks that the variable is not null and >= than
other |
|
|
Check.isIn(String varName,
T var,
ContainsAware<T> container)
Checks the var is not null and contained by the given
container |
|
Check<ExceptionType> |
Check.isInstanceOf(String varName,
Object var,
Class<?> expectedClass)
Checks that the variable is not null and instance of the given class |
|
|
Check.isLessThan(String varName,
T var,
T other)
Checks that the variable is not null and < than
other |
|
|
Check.isLessThanOrEqualTo(String varName,
T var,
T other)
Checks that the variable is not null and <= than
other |
|
|
Check.isMaxSize(String varName,
A var,
int maxSize,
SizeAwareType<A> type)
Checks that var is not null and its size less than or equals
to the the given maxSize |
|
Check<ExceptionType> |
Check.isMaxSize(String varName,
Collection<?> var,
int minSize)
Checks that var is not null and its size less than or equals
to the the given maxSize |
|
|
Check.isMinSize(String varName,
A var,
int minSize,
SizeAwareType<A> type)
Checks that var is not null and its size greater than or
equals to the the given minSize |
|
Check<ExceptionType> |
Check.isMinSize(String varName,
Collection<?> var,
int minSize)
Checks that var is not null and its size greater than or
equals to the the given minSize |
|
|
Check.isNotEmpty(String varName,
A var,
EmptyAwareType<A> type)
Checks that the variable is not null and not empty |
|
Check<ExceptionType> |
Check.isNotEmpty(String varName,
CharSequence var)
Checks that the CharSequence variable is not null and not empty |
|
Check<ExceptionType> |
Check.isNotEmpty(String varName,
Collection<?> var)
Checks that the Collection variable is not null and not empty |
|
Check<ExceptionType> |
Check.isNotEmpty(String varName,
EmptyAware var)
Checks that the EmptyAware var is not null and not empty |
|
Check<ExceptionType> |
Check.isNotEmpty(String varName,
Iterable<?> var)
Checks that the Iterable variable is not null and not empty |
|
Check<ExceptionType> |
Check.isNotEmpty(String varName,
Map<?,?> var)
Checks that the Map variable is not null and not empty |
|
|
Check.isNotNegative(String varName,
A var,
NumberType<A> type)
Checks the var is >= 0 |
|
Check<ExceptionType> |
Check.isNotNegative(String varName,
BigDecimal var)
Checks the variable is >= 0 |
|
Check<ExceptionType> |
Check.isNotNegative(String varName,
BigInteger var)
Checks the variable is >= 0 |
|
Check<ExceptionType> |
Check.isNotNegative(String varName,
double var)
Checks the variable is >= 0 |
|
Check<ExceptionType> |
Check.isNotNegative(String varName,
float var)
Checks the variable is >= 0 |
|
Check<ExceptionType> |
Check.isNotNegative(String varName,
int var)
Checks the variable is >= 0 |
|
Check<ExceptionType> |
Check.isNotNegative(String varName,
long var)
Checks the variable is >= 0 |
|
Check<ExceptionType> |
Check.isNotNull(String varName,
Object var)
Checks the variable is not null. |
|
|
Check.isNotZero(String varName,
A var,
NumberType<A> type)
Checks the var is not null and not equal to 0 |
|
Check<ExceptionType> |
Check.isNull(String varName,
Object var)
Checks the variable is null. |
|
|
Check.isPositive(String varName,
A var,
NumberType<A> type)
Checks the var is > 0 |
|
Check<ExceptionType> |
Check.isPositive(String varName,
BigDecimal var)
Checks the var is > 0 |
|
Check<ExceptionType> |
Check.isPositive(String varName,
BigInteger var)
Checks the var is not null and > 0 |
|
Check<ExceptionType> |
Check.isPositive(String varName,
double var)
Checks the var is > 0 |
|
Check<ExceptionType> |
Check.isPositive(String varName,
float var)
Checks the var is > 0 |
|
Check<ExceptionType> |
Check.isPositive(String varName,
int var)
Checks the var is > 0 |
|
Check<ExceptionType> |
Check.isPositive(String varName,
long var)
Checks the var is > 0 |
|
|
Check.isSize(String varName,
A var,
int expectedSize,
SizeAwareType<A> type)
Checks that var is not null and its ize is the given
expectedSize |
|
Check<ExceptionType> |
Check.isSize(String varName,
CharSequence var,
int size)
Checks that var is not null and its size is the given
expectedSize |
|
Check<ExceptionType> |
Check.isSize(String varName,
Collection<?> var,
int size)
Checks that var is not null and its size is the given
expectedSize |
|
Check<ExceptionType> |
Check.isSize(String varName,
Map<?,?> var,
int size)
Checks that var is not null and its size is the given
expectedSize |
|
Check<ExceptionType> |
Check.isSize(String varName,
SizeAware var,
int size)
Checks that var is not null and its size is the given
expectedSize |
|
Check<ExceptionType> |
Check.isTrue(String varName,
boolean var)
Checks a that the variable is true, failing with a generated message if it is not. |
|
|
Check.isZero(String varName,
A var,
NumberType<A> type)
Checks the var is not null and equal to 0 |
|
Check<ExceptionType> |
Check.matches(String varName,
String var,
Pattern pattern)
Checks that the variable is not null and matches a given pattern |
|
Check<ExceptionType> |
Check.matches(String varName,
String var,
String regex)
Checks that the variable is not null and matches a given regular expression. |
|
static Check<AssertionError> |
Assert.that()
|
|
static Check<IllegalArgumentException> |
Ensure.that()
|
|
Check<ExceptionType> |
Check.that(boolean condition,
String message,
Object... args)
Checks a that a condition is true, failing if it is not. |
|
Check<ExceptionType> |
Check.thatVar(String varName,
Object var,
boolean condition,
String message,
Object... args)
Checks a condition, failing if not met. |
|
|
||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||