jtge.util.random
Class RandomIterator
java.lang.Object
jtge.util.random.RandomIterator
- All Implemented Interfaces:
- java.util.Iterator
- public class RandomIterator
- extends java.lang.Object
- implements java.util.Iterator
Wraps an iterator to provide randomization of its elements.
- Version:
- $Revision: 1.3 $ $Date: 2005/08/26 18:09:36 $
- Author:
- Mathieu Champlon
Constructor Summary |
RandomIterator(IRandom random,
java.util.Iterator iterator)
Create a random iterator over a list. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RandomIterator
public RandomIterator(IRandom random,
java.util.Iterator iterator)
- Create a random iterator over a list.
- Parameters:
random
- the random number generatoriterator
- the data to randomize
remove
public final void remove()
-
- Specified by:
remove
in interface java.util.Iterator
hasNext
public final boolean hasNext()
-
- Specified by:
hasNext
in interface java.util.Iterator
next
public final java.lang.Object next()
-
- Specified by:
next
in interface java.util.Iterator
Copyright © 2003-2005 . All Rights Reserved.