@Beta public class LinkTypeConstraint extends BooleanConstraint
| Constructor and Description |
|---|
LinkTypeConstraint(boolean inclusive,
Link.Type... types)
Creates a new constraint for requesting connectivity using or avoiding
the specified link types.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
boolean |
isInclusive()
Indicates if the constraint is inclusive or exclusive.
|
boolean |
isValid(Link link,
ResourceContext context)
Returns true if the specified link satisfies the constraint.
|
java.lang.String |
toString() |
java.util.Set<Link.Type> |
types()
Returns the set of link types.
|
cost, validatepublic LinkTypeConstraint(boolean inclusive,
Link.Type... types)
inclusive - indicates whether the given link types are to be
permitted or avoidedtypes - link typespublic boolean isValid(Link link, ResourceContext context)
BooleanConstraintisValid in class BooleanConstraintlink - link to be validatedcontext - resource context for checking available resourcespublic java.util.Set<Link.Type> types()
public boolean isInclusive()
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