public static <ItemType, CollectionType extends IIterableCollection<INodeCallback<ItemType>>>
      void iterate(
          final CollectionType collection, final IFilteredItemCallback<ItemType> callback) {
    collection.iterate(
        new INodeCallback<ItemType>() {
          @Override
          public IterationMode next(final ItemType node) {
            if (callback.qualifies(node)) {
              return callback.next(node);
            }

            return IterationMode.CONTINUE;
          }
        });
  }
Creates a list of all visible nodes of the graph.

@param <NodeType> The type of the nodes in the graph.
@param graph The graph in question.
@return All visible nodes of the graph.
java/zylib/src/main/java/com/google/security/zynamics/zylib/gui/zygraph/helpers/GraphHelpers.java