presto-main/src/main/java/io/prestosql/execution/scheduler/ResettableRandomizedIterator.java/ResettableRandomizedIterator/next
class ResettableRandomizedIterator:    @Override
    public T next()
    {
        if (!hasNext()) {
            throw new NoSuchElementException();
        }

        int position = ThreadLocalRandom.current().nextInt(this.position, list.size());

        T result = list.set(position, list.get(this.position));
        list.set(this.position, result);
        this.position++;

        return result;
    }