Class IntGenerator
java.lang.Object
it.unimi.di.prog2.h13.IntGenerator
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionIntGenerator(int[] els, int size) Builds an iterator (partial constructor, used just inArrayIntSet). -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterator
forEachRemaining, remove
-
Field Details
-
els
private final int[] elsThe list elements. -
size
private final int sizeThe number of elements in the set. -
idx
private int idxThe position of the next element to return (ifidx < els.length.
-
-
Constructor Details
-
IntGenerator
public IntGenerator(int[] els, int size) Builds an iterator (partial constructor, used just inArrayIntSet).- Parameters:
els- the list of elements, must not be, or contain,null.size- the number of set elements inels.
-
-
Method Details
-
hasNext
-
next
-