Class WaypointConstraint

  • All Implemented Interfaces:
    Constraint

    @Beta
    public final class WaypointConstraint
    extends PathViabilityConstraint
    Constraint that evaluates elements passed through in order.
    • Constructor Detail

      • WaypointConstraint

        public WaypointConstraint​(DeviceId... waypoints)
        Creates a new waypoint constraint.
        Parameters:
        waypoints - waypoints
    • Method Detail

      • validate

        public boolean validate​(Path path,
                                ResourceContext context)
        Description copied from interface: Constraint
        Validates that the specified path satisfies the constraint.
        Parameters:
        path - path to be validated
        context - resource context for validating availability of resources
        Returns:
        cost of link traversal
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object