Class NetPathWithin<T>

  • All Implemented Interfaces:
    Query<T>

    public class NetPathWithin<T>
    extends Object
    implements Query<T>
    A Query that returns all nodes within some given path length of a specified node. "Within" includes the upper limit.
    Version:
    $Revision$ $Date$
    Author:
    Nick Collier
    • Constructor Summary

      Constructors 
      Constructor Description
      NetPathWithin​(Context<T> context, T obj, double distance)
      Creates a NetPathWithin query that returns all nodes within the specified path length of the specified node in all the networks in the specified context.
      NetPathWithin​(Network<T> network, T obj, double distance)
      Creates a NetPathWithin query that returns all nodes within the specified path length of the specified node in the specified network.
    • Constructor Detail

      • NetPathWithin

        public NetPathWithin​(Context<T> context,
                             T obj,
                             double distance)
        Creates a NetPathWithin query that returns all nodes within the specified path length of the specified node in all the networks in the specified context.
        Parameters:
        context -
        obj -
        distance -
      • NetPathWithin

        public NetPathWithin​(Network<T> network,
                             T obj,
                             double distance)
        Creates a NetPathWithin query that returns all nodes within the specified path length of the specified node in the specified network.
        Parameters:
        network -
        obj -
        distance -
    • Method Detail

      • query

        public Iterable<T> query()
        Gets an iterable over all the nodes within the path length of the target node as specified in the constructor.
        Specified by:
        query in interface Query<T>
        Returns:
        an iterable over all the nodes with the path length of the target node as specified in the constructor.
      • query

        public Iterable<T> query​(Iterable<T> set)
        Gets an iterable over all the nodes within the path length of the target node as specified in the constructor AND where those nodes are members of the iterable parameter.
        Specified by:
        query in interface Query<T>
        Parameters:
        set -
        Returns:
        an iterable over all the nodes within the path length of the target node as specified in the constructor AND where those nodes are members of the iterable parameter.