public class Constraint extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected String |
featureName
The name of the feature to be tested.
|
protected ConstraintType |
predicate
The predicate of the constraint (which condition should be satisfied).
|
protected Object |
value
The value to be compared with the feature value (i.e.
|
Constructor and Description |
---|
Constraint(ConstraintType predicate,
String featureName,
Object value)
Creates a constraint for an annotation feature.
|
Modifier and Type | Method and Description |
---|---|
String |
getFeatureName() |
ConstraintType |
getPredicate() |
Object |
getValue() |
String |
toString() |
protected String featureName
protected ConstraintType predicate
protected Object value
public Constraint(ConstraintType predicate, String featureName, Object value)
predicate
- the predicate (condition to be checked).featureName
- the name of the feature to be tested.value
- the value to be tested against (i.e. the right-hand operand
of the constraint predicate). This value should be of type String
, or a
subclass of Number
for compare tests. In the case of
ConstraintType.REGEX
constraints, the value should be either one single
String
(if only pattern is provided) or an array of two String
values (the first being the pattern, the second being the flags).Copyright © 2021 GATE. All rights reserved.