code: public int getNodeIndex(final Node node) {
          for (int i = 0; i < nodeList.size(); i++) {
              if (nodeList.get(i).equals(node)) {
                  return i;
              }
          }
          return -1;
      }
docs: Return a node index.
  
  @param node node to check an index
  @return -1 if the node does not exist.