public static <NodeType extends ISelectableNode> List<NodeType> getInvisibleNodes(
      final IViewableGraph<NodeType> graph) {
    final ArrayList<NodeType> nodes = new ArrayList<NodeType>();

    graph.iterateInvisible(
        new INodeCallback<NodeType>() {
          @Override
          public IterationMode next(final NodeType node) {
            nodes.add(node);
            return IterationMode.CONTINUE;
          }
        });

    return nodes;
  }
Returns a list of nodes that match the given filter.

@param <NodeType> Type of the nodes in the graph.
@param graph The graph that provides the nodes.
@param filter The filter that selects the nodes.
@return The list of nodes that passes the filter.
java/zylib/src/main/java/com/google/security/zynamics/zylib/gui/zygraph/helpers/GraphHelpers.java