docs: @Override
     public Object[] toArray() {
        // Estimate size of array; be prepared to see more or fewer elements
        Object[] r = new Object[size()];
        try (CloseableIterator<O> it = iterator()) {
           for (int i = 0; i < r.length; i++) {
              if (! it.hasNext()) // fewer elements than expected
                 return Arrays.copyOf(r, i);
              r[i] = it.next();
           }
           return it.hasNext() ? finishToArray(r, it) : r;
        }
     }