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