code: public final int getIndexOfChild(Node child) {
      Node n = first;
      int i = 0;
      while (n != null) {
        if (child == n) {
          return i;
        }
  
        n = n.next;
        i++;
      }
      return -1;
    }
docs: Gets the index of a child, note that this is O(N) where N is the number of children.
  
  @param child The child
  @return The index of the child