public static <EdgeType extends ZyGraphEdge<?, ?, ?> & ISelectableNode & IViewableNode>
      void iterateVisible(
          final AbstractZyGraph<?, EdgeType> graph, final IEdgeCallback<EdgeType> callback) {
    Preconditions.checkNotNull(callback, "Error: Callback argument can't be null");

    graph.iterateEdges(
        new IEdgeCallback<EdgeType>() {
          @Override
          public IterationMode nextEdge(final EdgeType edge) {
            if (!edge.isVisible()) {
              return IterationMode.CONTINUE;
            }

            return callback.nextEdge(edge);
          }
        });
  }
Iterates over all selected nodes in the graph.

@param callback Callback object that is invoked once for each selected node in the graph.
java/zylib/src/main/java/com/google/security/zynamics/zylib/gui/zygraph/functions/IteratorFunctions.java