Class FilteredUniqueRandomIterator<T>

java.lang.Object
ai.timefold.solver.core.impl.bavet.common.index.FilteredUniqueRandomIterator<T>
Type Parameters:
T -
All Implemented Interfaces:
UniqueRandomIterator<T>, Iterator<T>

@NullMarked public final class FilteredUniqueRandomIterator<T> extends Object implements UniqueRandomIterator<T>
Unlike DefaultUniqueRandomIterator, this class only returns elements that match the given filter. Because we can't predict how many elements will be filtered out, and because we don't want to pre-filter the entire list, this class may need to try multiple times to find a matching element.