@Beta public class ProtectionConstraint extends Object implements Constraint
| Modifier | Constructor and Description |
|---|---|
protected |
ProtectionConstraint() |
| Modifier and Type | Method and Description |
|---|---|
double |
cost(Link link,
ResourceContext context)
Evaluates the specified link and provides the cost for its traversal.
|
static ProtectionConstraint |
protection()
Returns protection constraint.
|
static boolean |
requireProtectedPath(Intent intent)
Determines whether to utilize path protection for the given intent.
|
String |
toString() |
boolean |
validate(Path path,
ResourceContext context)
Validates that the specified path satisfies the constraint.
|
public double cost(Link link, ResourceContext context)
Constraintcost in interface Constraintlink - link to be evaluatedcontext - resource context for validating availability of resourcespublic boolean validate(Path path, ResourceContext context)
Constraintvalidate in interface Constraintpath - path to be validatedcontext - resource context for validating availability of resourcespublic static boolean requireProtectedPath(Intent intent)
intent - intent to be inspectedpublic static ProtectionConstraint protection()