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

    graph.iterate(
        new INodeCallback<NodeType>() {
          @Override
          public IterationMode next(final NodeType node) {
            if (!node.isVisible()) {
              return IterationMode.CONTINUE;
            }

            return callback.next(node);
          }
        });
  }
Iterates over all visible nodes in the graph.

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