public int getIndexOf(N child) {
      if (children != null) {
        for (int i = 0; i < children.size(); i++) {
          if (child == children.get(i).getNode()) return i;
        }
      }
      return -1;
    }
public int getIndexOf(N child)