static L takeLastFromIterator(int n, Iterator it) { SimpleCircularBuffer buf = new(n); if (it != null) while (it.hasNext()) buf.add(it.next()); ret buf.asList(); }