public void selectNodes(final Collection<NodeType> nodes, final boolean selected) {
    Preconditions.checkNotNull(nodes, "Nodes argument can't be null");

    m_graph.firePreEvent();

    for (final NodeType node : nodes) {
      Preconditions.checkNotNull(
          node, "Error: The list of nodes to select contained an invalid node.");

      ((IViewNode<?>) node.getRawNode()).setSelected(selected);
    }

    m_graph.firePostEvent();
  }
Selects or unselects a list of nodes.

@param nodes The nodes to select or unselect.
@param selected True, to select the nodes. False, to unselect the nodes.
java/zylib/src/main/java/com/google/security/zynamics/zylib/yfileswrap/gui/zygraph/AbstractZyGraph.java