class ShufflingEntitySelector<Solution_> extends AbstractCachingEntitySelector<Solution_> {

    public ShufflingEntitySelector(EntitySelector<Solution_> childEntitySelector, SelectionCacheType cacheType) {
        super(childEntitySelector, cacheType);
    }

    // ************************************************************************
    // Worker methods
    // ************************************************************************

    @Override
    public boolean isNeverEnding() {
        return false;
    }

    @Override
    public Iterator<Object> iterator() {
        Collections.shuffle(cachedEntityList, workingRandom);
        logger.trace("    Shuffled cachedEntityList with size ({}) in entitySelector({}).",
                cachedEntityList.size(), this);
        return cachedEntityList.iterator();
    }

    @Override
    public ListIterator<Object> listIterator() {
        Collections.shuffle(cachedEntityList, workingRandom);
        logger.trace("    Shuffled cachedEntityList with size ({}) in entitySelector({}).",
                cachedEntityList.size(), this);
        return cachedEntityList.listIterator();
    }

    @Override
    public ListIterator<Object> listIterator(int index) {<FILL_FUNCTION_BODY>}

    @Override
    public String toString() {
        return "Shuffling(" + childEntitySelector + ")";
    }

}

        // Presumes that listIterator() has already been called and shuffling would be bad
        return cachedEntityList.listIterator(index);
    
<methods>public void <init>(EntitySelector<Solution_>, org.optaplanner.core.config.heuristic.selector.common.SelectionCacheType) ,public void constructCache(SolverScope<Solution_>) ,public void disposeCache(SolverScope<Solution_>) ,public Iterator<java.lang.Object> endingIterator() ,public boolean equals(java.lang.Object) ,public org.optaplanner.core.config.heuristic.selector.common.SelectionCacheType getCacheType() ,public EntitySelector<Solution_> getChildEntitySelector() ,public EntityDescriptor<Solution_> getEntityDescriptor() ,public long getSize() ,public int hashCode() ,public boolean isCountable() <variables>protected final non-sealed org.optaplanner.core.config.heuristic.selector.common.SelectionCacheType cacheType,protected List<java.lang.Object> cachedEntityList,protected final non-sealed EntitySelector<Solution_> childEntitySelector