org.apache.mahout.common.iterator
Class PermutingIterator<T>

java.lang.Object
  extended by org.apache.mahout.common.iterator.PermutingIterator<T>
All Implemented Interfaces:
java.util.Iterator<T>

public final class PermutingIterator<T>
extends java.lang.Object
implements java.util.Iterator<T>

An Iterator that iterates in a random order over a given sequence of elements. It is non-destructive.


Constructor Summary
PermutingIterator(T[] elements)
           
 
Method Summary
 boolean hasNext()
           
 T next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PermutingIterator

public PermutingIterator(T[] elements)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<T>

next

public T next()
Specified by:
next in interface java.util.Iterator<T>

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<T>
Throws:
java.lang.UnsupportedOperationException - always


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.