public class EncapsulationConstraint extends BooleanConstraint
Constructor and Description |
---|
EncapsulationConstraint(EncapsulationType encapType)
Creates a new encapsulation constraint.
|
Modifier and Type | Method and Description |
---|---|
EncapsulationType |
encapType()
Returns the encapsulation type required by this constraint.
|
boolean |
equals(Object obj) |
int |
hashCode() |
boolean |
isValid(Link link,
ResourceContext context)
Returns true if the specified link satisfies the constraint.
|
String |
toString() |
cost, validate
public EncapsulationConstraint(EncapsulationType encapType)
encapType
- the encapsulation type EncapsulationType
public boolean isValid(Link link, ResourceContext context)
BooleanConstraint
isValid
in class BooleanConstraint
link
- link to be validatedcontext
- resource context for checking available resourcespublic EncapsulationType encapType()