Package org.apache.uima.cas
Interface FSIntConstraint
- All Superinterfaces:
FSConstraint
,Serializable
Interface for an integer constraint. A integer constraint contains 0 or more tests, the results
of which are "anded" together. To set a test, use any of the methods on this class (except
"match").
To use the constraint, invoke its match(int)
method, passing the value to test. You can
also embed this test with a path specification, using the
ConstraintFactory.embedConstraint(FeaturePath, FSConstraint)
method,
and use it to test feature structures, or combine it with other tests using the
ConstraintFactory.and(FSMatchConstraint, FSMatchConstraint)
and
ConstraintFactory.or(FSMatchConstraint, FSMatchConstraint)
methods.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
eq
(int i) Require int value to be equali
.void
geq
(int i) Require int value to be greater than or equal toi
.void
gt
(int i) Require int value to be greater thani
.void
leq
(int i) Require int value to be less than or equal toi
.void
lt
(int i) Require int value to be less thani
.boolean
match
(int i) Check if integer matches defined constraints.
-
Method Details
-
eq
void eq(int i) Require int value to be equali
.- Parameters:
i
- Matched value must be equal to this.
-
lt
void lt(int i) Require int value to be less thani
.- Parameters:
i
- Matched value must be less than this.
-
leq
void leq(int i) Require int value to be less than or equal toi
.- Parameters:
i
- Matched value must be less than or equal to this.
-
gt
void gt(int i) Require int value to be greater thani
.- Parameters:
i
- Matched value must be greater than this.
-
geq
void geq(int i) Require int value to be greater than or equal toi
.- Parameters:
i
- Matched value must be greater than or equal to this.
-
match
boolean match(int i) Check if integer matches defined constraints.- Parameters:
i
- The int to be checked.- Returns:
true
iff the int satisfies the constraints.
-