@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(Object obj) |
int |
hashCode() |
boolean |
isValid(Link link,
ResourceContext context)
Returns true if the specified link satisfies the constraint.
|
Set<DeviceId> |
obstacles()
Returns the obstacle device ids.
|
String |
toString() |
cost, validatepublic ObstacleConstraint(DeviceId... obstacles)
obstacles - devices not to be passedpublic Set<DeviceId> obstacles()
public boolean isValid(Link link, ResourceContext context)
BooleanConstraintisValid in class BooleanConstraintlink - link to be validatedcontext - resource context for checking available resources