@Beta public class ObstacleConstraint extends BooleanConstraint
Constructor and Description |
---|
ObstacleConstraint(DeviceId... obstacles)
Creates a new constraint that the specified device are not passed through.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
boolean |
isValid(Link link,
ResourceContext context)
Returns true if the specified link satisfies the constraint.
|
java.util.Set<DeviceId> |
obstacles()
Returns the obstacle device ids.
|
java.lang.String |
toString() |
cost, validate
public ObstacleConstraint(DeviceId... obstacles)
obstacles
- devices not to be passedpublic java.util.Set<DeviceId> obstacles()
public boolean isValid(Link link, ResourceContext context)
BooleanConstraint
isValid
in class BooleanConstraint
link
- link to be validatedcontext
- resource context for checking available resourcespublic 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