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(java.lang.Object obj) |
int |
hashCode() |
boolean |
isValid(Link link,
ResourceContext context)
Returns true if the specified link satisfies the constraint.
|
java.lang.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()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object