code: public final boolean hasXChildren(int x) {
      int c = 0;
      for (Node n = first; n != null && c <= x; n = n.next) {
        c++;
      }
      return c == x;
    }
docs: Check for has exactly the number of specified children.
  
  @return Whether the node has exactly the number of children specified.