public abstract class UniqueValidation<T,U> extends java.lang.Object implements ValidationFunction<T>
Constructor and Description |
---|
UniqueValidation() |
Modifier and Type | Method and Description |
---|---|
boolean |
check(ValidationContext ctx,
T t)
Returns
true if the constraint is valid and false
if it's broken. |
abstract U |
getNextObject(ValidationContext ctx,
T t,
int n)
Returns the n-th object that should be tested.
|
abstract int |
getNumObjects(ValidationContext ctx,
T t)
Returns the total number of objects which should be tested.
|
java.util.Set<U> ids
public boolean check(ValidationContext ctx, T t)
ValidationFunction
true
if the constraint is valid and false
if it's broken.check
in interface ValidationFunction<T>
false
if the constraint is brokenpublic abstract int getNumObjects(ValidationContext ctx, T t)
ctx
- t
- public abstract U getNextObject(ValidationContext ctx, T t, int n)
ctx
- t
- n
-