@Beta public final class BandwidthConstraint extends BooleanConstraint
| Constructor and Description |
|---|
BandwidthConstraint(Bandwidth bandwidth)
Creates a new bandwidth constraint.
|
| Modifier and Type | Method and Description |
|---|---|
Bandwidth |
bandwidth()
Returns the bandwidth 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.
|
static BandwidthConstraint |
of(double v,
DataRateUnit unit)
Creates a new bandwidth constraint.
|
java.lang.String |
toString() |
cost, validatepublic BandwidthConstraint(Bandwidth bandwidth)
bandwidth - required bandwidthpublic static BandwidthConstraint of(double v, DataRateUnit unit)
v - required amount of bandwidthunit - DataRateUnit of vBandwidthConstraint instance with given bandwidth requirementpublic boolean isValid(Link link, ResourceContext context)
BooleanConstraintisValid in class BooleanConstraintlink - link to be validatedcontext - resource context for checking available resourcespublic Bandwidth bandwidth()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object