AbstractConstraint
, CategoryConstraintGroup
, ConstraintGroup
, ValidationConstraint
public interface AnyConstraint<T>
Modifier and Type | Method | Description |
---|---|---|
boolean |
check(ValidationContext context,
T object) |
Checks if the object conforms to the specific rule in the given context.
|
int |
getErrorCode() |
Returns the error code from this constraint.
|
boolean check(ValidationContext context, T object)
If the rule behaves different for each level/version, the level and version of the context will be used.
context
- the validation contextobject
- the object to validatefalse
if the object does not respect the constraintint getErrorCode()
In the default case this should be an error code which is defined in the SBML specifications.