|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gcube.contentmanagement.contentmanager.stubs.model.constraints.Constraints
public class Constraints
Predefined Constraint
implementations.
Field Summary | |
---|---|
static Constraint<java.lang.Object> |
anyval
The null constraint. |
Constructor Summary | |
---|---|
Constraints()
|
Method Summary | ||
---|---|---|
static Constraint<java.util.Calendar> |
after(java.util.Calendar c)
Returns a After constraint for a given calendar. |
|
static Constraint<java.util.Date> |
afterDate(java.util.Date d)
Returns an AfterDate constraint for a given date. |
|
static
|
all(Constraint<T>... cs)
Returns an All constraint for given constraints. |
|
static Constraint<java.util.Calendar> |
before(java.util.Calendar c)
Returns a Before constraint for a given calendar. |
|
static Constraint<java.util.Date> |
before(java.util.Date d)
Returns a BeforeDate constraint for a given date. |
|
static
|
either(Constraint<T>... cs)
Returns an Either constraint for given constraints. |
|
static Constraint<java.util.Calendar> |
future()
Returns an After constraint for the current date. |
|
static Constraint<java.util.Date> |
futureDate()
Returns an AfterDate constraint for the current date. |
|
static
|
is(T o)
Returns a Same constraint for a given value. |
|
static Constraint<java.lang.Double> |
less(double than)
Returns a Less constraint for a maximum value. |
|
static Match |
matches(java.lang.String regex)
Returns a Match constraint for a given regular expression. |
|
static Constraint<java.lang.Double> |
more(double than)
Returns a More constraint for a minimum value. |
|
static
|
not(Constraint<T> c)
Returns an Not constraint for a given constraint. |
|
static Constraint<java.util.Calendar> |
past()
Returns an BEfore constraint for the current date. |
|
static Constraint<java.util.Date> |
pastDate()
Returns a BeforeDate constraint for the current date. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Constraint<java.lang.Object> anyval
Constructor Detail |
---|
public Constraints()
Method Detail |
---|
public static <T> Same<T> is(T o)
Same
constraint for a given value.
o
- the value.
public static Match matches(java.lang.String regex)
Match
constraint for a given regular expression.
regexp
- the expression.
public static <T> Constraint<T> all(Constraint<T>... cs)
All
constraint for given constraints.
T
- the type of constrained values.cs
- the constraints.
public static <T> Constraint<T> either(Constraint<T>... cs)
Either
constraint for given constraints.
T
- the type of constrained values.cs
- the constraints.
public static <T> Constraint<T> not(Constraint<T> c)
Not
constraint for a given constraint.
T
- the type of constrained values.c
- the given constraint.
public static Constraint<java.lang.Double> more(double than)
More
constraint for a minimum value.
the
- minimum value.
public static Constraint<java.lang.Double> less(double than)
Less
constraint for a maximum value.
than
- the maximum value.
public static Constraint<java.util.Date> before(java.util.Date d)
BeforeDate
constraint for a given date.
d
- the date.
public static Constraint<java.util.Date> afterDate(java.util.Date d)
AfterDate
constraint for a given date.
d
- the date.
public static Constraint<java.util.Date> futureDate()
AfterDate
constraint for the current date.
public static Constraint<java.util.Date> pastDate()
BeforeDate
constraint for the current date.
public static Constraint<java.util.Calendar> before(java.util.Calendar c)
Before
constraint for a given calendar.
c
- the calendar.
public static Constraint<java.util.Calendar> after(java.util.Calendar c)
After
constraint for a given calendar.
c
- the calendar.
public static Constraint<java.util.Calendar> future()
After
constraint for the current date.
public static Constraint<java.util.Calendar> past()
BEfore
constraint for the current date.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |