Class AllNodesVisitor

    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.util.Collection<Node> nodes
      The resulting nodes collected so far.
    • Constructor Summary

      Constructors 
      Constructor Description
      AllNodesVisitor()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Collection<Node> getAllNodes​(java.util.Collection<? extends OsmPrimitive> osms)
      Replies all nodes contained by the given primitives
      void visit​(Node n)
      Nodes have only itself as nodes.
      void visit​(Relation e)
      Relations may have any number of nodes.
      void visit​(Way w)
      Ways have their way nodes.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • nodes

        public java.util.Collection<Node> nodes
        The resulting nodes collected so far.
    • Method Detail

      • visit

        public void visit​(Relation e)
        Relations may have any number of nodes. FIXME: do we want to collect nodes from segs/ways that are relation members? if so, use AutomatchVisitor!
        Specified by:
        visit in interface OsmPrimitiveVisitor
        Parameters:
        e - The relation to inspect.
      • getAllNodes

        public static java.util.Collection<NodegetAllNodes​(java.util.Collection<? extends OsmPrimitive> osms)
        Replies all nodes contained by the given primitives
        Parameters:
        osms - The OSM primitives to inspect
        Returns:
        All nodes the given primitives have.