|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectariba.util.core.SubsetIterator
public final class SubsetIterator
A SubsetIterator produces a series of subsets of the requested size from a source array of objects.
| Constructor Summary | |
|---|---|
SubsetIterator(Object[] source,
int subsetSize)
Creates a new SubsetIterator for the given source array, where each subset will be of the given subsetSize. |
|
SubsetIterator(Object[] source,
int subsetSize,
Object[] result)
Creates a new SubsetIterator for the given source array, where each subset will be of the given subsetSize. |
|
| Method Summary | |
|---|---|
boolean |
hasNext()
Returns true if the SubsetIterator has more elements. |
static void |
main(String[] args)
The first argument is assumed to be an integer which is the requested subset size. |
Object |
next()
Returns the next element of this SubsetIterator as an array of Objects. |
void |
remove()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SubsetIterator(Object[] source,
int subsetSize)
public SubsetIterator(Object[] source,
int subsetSize,
Object[] result)
| Method Detail |
|---|
public boolean hasNext()
hasNext in interface Iteratorpublic Object next()
next in interface Iteratorpublic void remove()
remove in interface Iteratorpublic static void main(String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||