|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.staccatocommons.check.Check<ExceptionType>
ExceptionType - The kind of exception that this check will thrown on validation
failures@Transparent public abstract class Check<ExceptionType extends Throwable>
Checks are objects that validate conditions. It is heavily inspired
on several validation utilities like org.apache.commons.lang.Validate
from Apache commons, but is designed to be more flexible and easy-to-use, so,
it should be seen as higher lever replacement.
The four main differences are the following
Check, are Ensure, Assert and ValidateCheck offers a rich interface. Not only method for checking nulls
or boolean values, but also, Collections sizes, regular expresion and
so on are exposedTransparent
Validate,
Ensure,
Assert| Nested Class Summary | |
|---|---|
static class |
Check.Failure
A basic check failure |
static class |
Check.VarFailure
A check failure that contains the name and value of the variable that was checked |
| Constructor Summary | |
|---|---|
Check()
|
|
| Method Summary | ||
|---|---|---|
|
contains(String varName,
ContainsAware<T> var,
T element)
Checks that the variable contains the given element |
|
protected abstract ExceptionType |
createException(Check.Failure failure)
|
|
protected ExceptionType |
createVarException(Check.VarFailure failure)
|
|
|
fail(String message,
Object... args)
Fails, throwing an exception with a message. |
|
|
failVar(String varName,
Object var,
String message,
Object... args)
Fails, throwing an exception with a message, the var and its name. |
|
|
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 |
|
|
isEmpty(String varName,
A var,
EmptyAwareType<A> type)
Checks that the variable is not null and empty |
|
Check<ExceptionType> |
isEmpty(String varName,
CharSequence var)
Checks that the variable is not null and empty |
|
Check<ExceptionType> |
isEmpty(String varName,
Collection<?> var)
Checks that the variable is not null and empty |
|
Check<ExceptionType> |
isEmpty(String varName,
EmptyAware var)
Checks that the variable is not null and empty |
|
Check<ExceptionType> |
isEmpty(String varName,
Iterable<?> var)
Checks that the variable is not null and empty |
|
Check<ExceptionType> |
isEmpty(String varName,
Map<?,?> var)
Checks that the variable is not null and empty |
|
Check<ExceptionType> |
isFalse(String varName,
boolean var)
Checks a that the variable is true, failing with a generated message if it is not. |
|
|
isGreaterThan(String varName,
T var,
T other)
Checks that the variable is not null and > than
other |
|
|
isGreaterThanOrEqualTo(String varName,
T var,
T other)
Checks that the variable is not null and >= than
other |
|
|
isIn(String varName,
T var,
ContainsAware<T> container)
Checks the var is not null and contained by the given
container |
|
Check<ExceptionType> |
isInstanceOf(String varName,
Object var,
Class<?> expectedClass)
Checks that the variable is not null and instance of the given class |
|
|
isLessThan(String varName,
T var,
T other)
Checks that the variable is not null and < than
other |
|
|
isLessThanOrEqualTo(String varName,
T var,
T other)
Checks that the variable is not null and <= than
other |
|
|
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> |
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 |
|
|
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> |
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 |
|
|
isNotEmpty(String varName,
A var,
EmptyAwareType<A> type)
Checks that the variable is not null and not empty |
|
Check<ExceptionType> |
isNotEmpty(String varName,
CharSequence var)
Checks that the CharSequence variable is not null and not empty |
|
Check<ExceptionType> |
isNotEmpty(String varName,
Collection<?> var)
Checks that the Collection variable is not null and not empty |
|
Check<ExceptionType> |
isNotEmpty(String varName,
EmptyAware var)
Checks that the EmptyAware var is not null and not empty |
|
Check<ExceptionType> |
isNotEmpty(String varName,
Iterable<?> var)
Checks that the Iterable variable is not null and not empty |
|
Check<ExceptionType> |
isNotEmpty(String varName,
Map<?,?> var)
Checks that the Map variable is not null and not empty |
|
|
isNotNegative(String varName,
A var,
NumberType<A> type)
Checks the var is >= 0 |
|
Check<ExceptionType> |
isNotNegative(String varName,
BigDecimal var)
Checks the variable is >= 0 |
|
Check<ExceptionType> |
isNotNegative(String varName,
BigInteger var)
Checks the variable is >= 0 |
|
Check<ExceptionType> |
isNotNegative(String varName,
double var)
Checks the variable is >= 0 |
|
Check<ExceptionType> |
isNotNegative(String varName,
float var)
Checks the variable is >= 0 |
|
Check<ExceptionType> |
isNotNegative(String varName,
int var)
Checks the variable is >= 0 |
|
Check<ExceptionType> |
isNotNegative(String varName,
long var)
Checks the variable is >= 0 |
|
Check<ExceptionType> |
isNotNull(String varName,
Object var)
Checks the variable is not null. |
|
|
isNotZero(String varName,
A var,
NumberType<A> type)
Checks the var is not null and not equal to 0 |
|
Check<ExceptionType> |
isNull(String varName,
Object var)
Checks the variable is null. |
|
|
isPositive(String varName,
A var,
NumberType<A> type)
Checks the var is > 0 |
|
Check<ExceptionType> |
isPositive(String varName,
BigDecimal var)
Checks the var is > 0 |
|
Check<ExceptionType> |
isPositive(String varName,
BigInteger var)
Checks the var is not null and > 0 |
|
Check<ExceptionType> |
isPositive(String varName,
double var)
Checks the var is > 0 |
|
Check<ExceptionType> |
isPositive(String varName,
float var)
Checks the var is > 0 |
|
Check<ExceptionType> |
isPositive(String varName,
int var)
Checks the var is > 0 |
|
Check<ExceptionType> |
isPositive(String varName,
long var)
Checks the var is > 0 |
|
|
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> |
isSize(String varName,
CharSequence var,
int size)
Checks that var is not null and its size is the given
expectedSize |
|
Check<ExceptionType> |
isSize(String varName,
Collection<?> var,
int size)
Checks that var is not null and its size is the given
expectedSize |
|
Check<ExceptionType> |
isSize(String varName,
Map<?,?> var,
int size)
Checks that var is not null and its size is the given
expectedSize |
|
Check<ExceptionType> |
isSize(String varName,
SizeAware var,
int size)
Checks that var is not null and its size is the given
expectedSize |
|
Check<ExceptionType> |
isTrue(String varName,
boolean var)
Checks a that the variable is true, failing with a generated message if it is not. |
|
|
isZero(String varName,
A var,
NumberType<A> type)
Checks the var is not null and equal to 0 |
|
Check<ExceptionType> |
matches(String varName,
String var,
Pattern pattern)
Checks that the variable is not null and matches a given pattern |
|
Check<ExceptionType> |
matches(String varName,
String var,
String regex)
Checks that the variable is not null and matches a given regular expression. |
|
Check<ExceptionType> |
that(boolean condition,
String message,
Object... args)
Checks a that a condition is true, failing if it is not. |
|
Check<ExceptionType> |
thatVar(String varName,
Object var,
boolean condition,
String message,
Object... args)
Checks a condition, failing if not met. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Check()
| Method Detail |
|---|
protected ExceptionType createVarException(Check.VarFailure failure)
protected abstract ExceptionType createException(Check.Failure failure)
public <Nothing> Nothing fail(String message,
Object... args)
throws ExceptionType extends Throwable
Nothing - message - the error messageargs - the error message args
ExceptionType - always
ExceptionType extends Throwable
public <Nothing> Nothing failVar(String varName,
Object var,
String message,
Object... args)
throws ExceptionType extends Throwable
Nothing - varName - the name of the variable whose check failedvar - the variable whose check failedmessage - the error messageargs - the error message arguments
ExceptionType - always
ExceptionType extends Throwable
public final Check<ExceptionType> thatVar(String varName,
Object var,
boolean condition,
String message,
Object... args)
throws ExceptionType extends Throwable
varName - the name of the variable to be checkedvar - the variable to be checkedcondition - the condition to be checkedmessage - the error messageargs - the error message arguments
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final Check<ExceptionType> that(boolean condition,
String message,
Object... args)
throws ExceptionType extends Throwable
condition - the condition to be checkedmessage - the error messageargs - the error message arguments
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final Check<ExceptionType> isNotNull(String varName,
Object var)
throws ExceptionType extends Throwable
varName - the name of the variable to be checkedvar - the variable to be checked
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final Check<ExceptionType> isNull(String varName,
Object var)
throws ExceptionType extends Throwable
varName - the name of the variable to be checkedvar - the variable to be checked
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final Check<ExceptionType> isTrue(String varName,
boolean var)
throws ExceptionType extends Throwable
varName - the name of the variable to be checkedvar - the var to be checked
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final Check<ExceptionType> isFalse(String varName,
boolean var)
throws ExceptionType extends Throwable
varName - the name of the variable to be checkedvar - the var to be checked
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final Check<ExceptionType> matches(String varName,
String var,
String regex)
throws ExceptionType extends Throwable
varName - the name of the variable to be checkedvar - the var to be checkedregex - the regular expression the var must match
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwablethat(boolean, String, Object...)
public final Check<ExceptionType> matches(String varName,
String var,
Pattern pattern)
throws ExceptionType extends Throwable
varName - the name of the variable to be checkedvar - the variable to be checkedpattern - the pattern the variable must match
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwablethat(boolean, String, Object...)
public final Check<ExceptionType> isEmpty(String varName,
Collection<?> var)
throws ExceptionType extends Throwable
varName - the name of the variable to be checkedvar - the variable to be checked
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwablethat(boolean, String, Object...)
public final Check<ExceptionType> isEmpty(String varName,
Map<?,?> var)
throws ExceptionType extends Throwable
varName - the name of the variable to be checkedvar - the variable to be checked
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwablethat(boolean, String, Object...)
public final Check<ExceptionType> isEmpty(String varName,
Iterable<?> var)
throws ExceptionType extends Throwable
varName - the name of the variable to be checkedvar - the variable to be checked
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwablethat(boolean, String, Object...)
public final Check<ExceptionType> isEmpty(String varName,
CharSequence var)
throws ExceptionType extends Throwable
varName - the name of the variable to be checkedvar - the variable to be checked
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwablethat(boolean, String, Object...)
public final Check<ExceptionType> isEmpty(String varName,
EmptyAware var)
throws ExceptionType extends Throwable
varName - the name of the variable to be checkedvar - the variable to be checked
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwablethat(boolean, String, Object...)
public final <A> Check<ExceptionType> isEmpty(String varName,
A var,
EmptyAwareType<A> type)
throws ExceptionType extends Throwable
A - varName - the name of the variable to be checkedvar - the variable to be checkedtype - the EmptyAwareType used to determine if var
is not empty
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwablethat(boolean, String, Object...)
public final Check<ExceptionType> isInstanceOf(String varName,
Object var,
Class<?> expectedClass)
throws ExceptionType extends Throwable
varName - the name of the variable to be checkedvar - the variable to be checkedexpectedClass - the class the variable must be instance of
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwablethat(boolean, String, Object...)
public final Check<ExceptionType> isSize(String varName,
Collection<?> var,
int size)
throws ExceptionType extends Throwable
var is not null and its size is the given
expectedSize
varName - the name of the collection variable to be checkedvar - the Collection variable to be checkedsize - the size the variable must have
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final Check<ExceptionType> isSize(String varName,
CharSequence var,
int size)
throws ExceptionType extends Throwable
var is not null and its size is the given
expectedSize
varName - the name of the char sequence variable to be checkedvar - the CharSequence variable to be checkedsize - the size the variable must have
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final Check<ExceptionType> isSize(String varName,
SizeAware var,
int size)
throws ExceptionType extends Throwable
var is not null and its size is the given
expectedSize
varName - the name of the size-aware variable to be checkedvar - the SizeAware variable to be checkedsize - the size the variable must have
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final Check<ExceptionType> isSize(String varName,
Map<?,?> var,
int size)
throws ExceptionType extends Throwable
var is not null and its size is the given
expectedSize
varName - the name of the Map variable to be checkedvar - the Map variable to be checkedsize - the size the variable must have
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final <A> Check<ExceptionType> isSize(String varName,
A var,
int expectedSize,
SizeAwareType<A> type)
throws ExceptionType extends Throwable
var is not null and its ize is the given
expectedSize
A - varName - the name of the variable to be checkedvar - the variable to be checkedexpectedSize - type - the SizeAwareType used to determine if var
has the given expectedSize
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwablethat(boolean, String, Object...)
public final Check<ExceptionType> isMinSize(String varName,
Collection<?> var,
int minSize)
throws ExceptionType extends Throwable
var is not null and its size greater than or
equals to the the given minSize
varName - the name of the variable to be checkedvar - the variable to be checkedminSize - the minimum size
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwablethat(boolean, String, Object...)
public final <A> Check<ExceptionType> isMinSize(String varName,
A var,
int minSize,
SizeAwareType<A> type)
throws ExceptionType extends Throwable
var is not null and its size greater than or
equals to the the given minSize
A - varName - the name of the variable to be checkedvar - the variable to be checkedminSize - the minimum sizetype - the SizeAwareType used to determine the var
size
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwablethat(boolean, String, Object...)
public final Check<ExceptionType> isMaxSize(String varName,
Collection<?> var,
int minSize)
throws ExceptionType extends Throwable
var is not null and its size less than or equals
to the the given maxSize
varName - the name of the variable to be checkedvar - the variable to be checkedmaxSize - the maximum size
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwablethat(boolean, String, Object...)
public final <A> Check<ExceptionType> isMaxSize(String varName,
A var,
int maxSize,
SizeAwareType<A> type)
throws ExceptionType extends Throwable
var is not null and its size less than or equals
to the the given maxSize
A - varName - the name of the variable to be checkedvar - the variable to be checkedmaxSize - the maximum sizetype - the SizeAwareType used to determine the var
size
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwablethat(boolean, String, Object...)
public final Check<ExceptionType> isNotNegative(String varName,
long var)
throws ExceptionType extends Throwable
varName - the name of the variable to be checkedvar - the variable to be checked
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final Check<ExceptionType> isNotNegative(String varName,
int var)
throws ExceptionType extends Throwable
varName - the name of the variable to be checkedvar - the variable to be checked
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final Check<ExceptionType> isNotNegative(String varName,
double var)
throws ExceptionType extends Throwable
varName - the name of the variable to be checkedvar - the variable to be checked
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final Check<ExceptionType> isNotNegative(String varName,
float var)
throws ExceptionType extends Throwable
varName - the name of the variable to be checkedvar - the variable to be checked
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final Check<ExceptionType> isNotNegative(String varName,
BigDecimal var)
throws ExceptionType extends Throwable
varName - the name of the variable to be checkedvar - the variable to be checked
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final Check<ExceptionType> isNotNegative(String varName,
BigInteger var)
throws ExceptionType extends Throwable
varName - the name of the variable to be checkedvar - the variable to be checked
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final <A> Check<ExceptionType> isNotNegative(String varName,
A var,
NumberType<A> type)
throws ExceptionType extends Throwable
var is >= 0
A - varName - the name of the variable to be checkedvar - the variable to be checkedtype - the NumberType used to determine if var is
negative
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final <A> Check<ExceptionType> isNotZero(String varName,
A var,
NumberType<A> type)
throws ExceptionType extends Throwable
var is not null and not equal to 0
A - varName - the name of the variable to be checkedvar - the variable to be checkedtype - the NumberType used to determine if var is
not zero, based on NumberType.isZero(Object)
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final <A> Check<ExceptionType> isZero(String varName,
A var,
NumberType<A> type)
throws ExceptionType extends Throwable
var is not null and equal to 0
A - varName - the name of the variable to be checkedvar - the variable to be checkedtype - the NumberType used to determine if var is
zero, based on NumberType.isZero(Object)
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final Check<ExceptionType> isNotEmpty(String varName,
EmptyAware var)
throws ExceptionType extends Throwable
EmptyAware var is not null and not empty
varName - the name of the variable to be checkedvar - the variable to be checked
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final Check<ExceptionType> isNotEmpty(String varName,
Collection<?> var)
throws ExceptionType extends Throwable
Collection variable is not null and not empty
varName - the name of the variable to be checkedvar - the variable to be checked
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final Check<ExceptionType> isNotEmpty(String varName,
CharSequence var)
throws ExceptionType extends Throwable
CharSequence variable is not null and not empty
varName - the name of the variable to be checkedvar - the variable to be checked
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final Check<ExceptionType> isNotEmpty(String varName,
Map<?,?> var)
throws ExceptionType extends Throwable
Map variable is not null and not empty
varName - the name of the variable to be checkedvar - the variable to be checked
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final Check<ExceptionType> isNotEmpty(String varName,
Iterable<?> var)
throws ExceptionType extends Throwable
Iterable variable is not null and not empty
varName - the name of the variable to be checkedvar - the variable to be checked
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final <A> Check<ExceptionType> isNotEmpty(String varName,
A var,
EmptyAwareType<A> type)
throws ExceptionType extends Throwable
A - varName - the name of the variable to be checkedvar - the variable to be checkedtype - the EmptyAwareType used to determine if var
is empty
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwablethat(boolean, String, Object...)
public final Check<ExceptionType> isPositive(String varName,
long var)
throws ExceptionType extends Throwable
varName - the name of the variable to be checkedvar - the variable to be checked
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final Check<ExceptionType> isPositive(String varName,
int var)
throws ExceptionType extends Throwable
varName - the name of the variable to be checkedvar - the variable to be checked
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final Check<ExceptionType> isPositive(String varName,
double var)
throws ExceptionType extends Throwable
varName - the name of the variable to be checkedvar - the variable to be checked
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final Check<ExceptionType> isPositive(String varName,
float var)
throws ExceptionType extends Throwable
varName - the name of the variable to be checkedvar - the variable to be checked
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final Check<ExceptionType> isPositive(String varName,
BigDecimal var)
throws ExceptionType extends Throwable
varName - the name of the variable to be checkedvar - the variable to be checked
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final Check<ExceptionType> isPositive(String varName,
BigInteger var)
throws ExceptionType extends Throwable
varName - the name of the variable to be checkedvar - the variable to be checked
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final <A> Check<ExceptionType> isPositive(String varName,
A var,
NumberType<A> type)
throws ExceptionType extends Throwable
var is > 0
A - varName - the name of the variable to be checkedvar - the variable to be checkedtype - the NumberType used to determine if var is
positive
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final <T extends Comparable<T>> Check<ExceptionType> isBetween(String varName,
T var,
T min,
T max)
throws ExceptionType extends Throwable
var is not null, less than or equal to
max and greater than or equal to min
varName - the name of the variable to be checkedvar - the variable to be checkedmin - max -
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final <T> Check<ExceptionType> contains(String varName,
ContainsAware<T> var,
T element)
throws ExceptionType extends Throwable
T - the contained element typevarName - the name of the variable to be checkedvar - the variable to be checkedelement - the element that the variable must contain
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final <T> Check<ExceptionType> isIn(String varName,
T var,
ContainsAware<T> container)
throws ExceptionType extends Throwable
var is not null and contained by the given
container
varName - the name of the variable to be checkedvar - the variable to be checkedcontainer - the ContainsAware that must contain var
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final <T extends Comparable<T>> Check<ExceptionType> isGreaterThan(String varName,
T var,
T other)
throws ExceptionType extends Throwable
null and > than
other
T - the contained element typevarName - the name of the variable to be checkedvar - the variable to be checkedother - the Comparable object of the same type to be compared
against var
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final <T extends Comparable<T>> Check<ExceptionType> isGreaterThanOrEqualTo(String varName,
T var,
T other)
throws ExceptionType extends Throwable
null and >= than
other
T - the contained element typevarName - the name of the variable to be checkedvar - the variable to be checkedother - the Comparable object of the same type to be compared
against var
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final <T extends Comparable<T>> Check<ExceptionType> isLessThan(String varName,
T var,
T other)
throws ExceptionType extends Throwable
null and < than
other
T - the contained element typevarName - the name of the variable to be checkedvar - the variable to be checkedother - the Comparable object of the same type to be compared
against var
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
public final <T extends Comparable<T>> Check<ExceptionType> isLessThanOrEqualTo(String varName,
T var,
T other)
throws ExceptionType extends Throwable
null and <= than
other
T - the contained element typevarName - the name of the variable to be checkedvar - the variable to be checkedother - the Comparable object of the same type to be compared
against var
this, in order to allow method chaining
ExceptionType - if the check failed
ExceptionType extends Throwable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||