T - The element class which is iterated.public class RandomSubsetIterator<T> extends SubsetIterator<T>
| Constructor and Description |
|---|
RandomSubsetIterator(Set<T> set,
boolean avoidDuplicates)
Creates a new subset iterator for the given set.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
Set<T> |
next() |
getSet, removeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic RandomSubsetIterator(Set<T> set, boolean avoidDuplicates)
set - some set.avoidDuplicates - whether to avoid duplicates in the iteration.
NOTE: setting this value to true might increase computation time
and needed space drastically.Copyright © 2018. All rights reserved.