|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.nite.search.ListPermuteIterator
public class ListPermuteIterator
ListPermuteIterator implement an Iterator to
walk through all permutations of the given list.
I.e. next() of a new ListPermuteIterator( {a, b, c} ) will
visit these lists:
{a, b, c}
{a, c, b}
{b, a, c}
{b, c, a}
{c, a, b}
{c, b, a}.
Constructor Summary | |
---|---|
ListPermuteIterator(java.util.List list)
Creates a new Iterator to walk through all permutations of the given list. |
Method Summary | |
---|---|
boolean |
hasNext()
Returns true if the iteration has more permutations. |
java.lang.Object |
next()
Returns the next permutation in the iteration. |
void |
remove()
The remove operation is not supported by this Iterator. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ListPermuteIterator(java.util.List list)
list
- the list to permutateMethod Detail |
---|
public boolean hasNext()
hasNext
in interface java.util.Iterator
public java.lang.Object next() throws java.util.NoSuchElementException
next
in interface java.util.Iterator
java.util.NoSuchElementException
- there are no more permutationspublic void remove()
remove
in interface java.util.Iterator
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |