jtge.util.random
Class RandomIterator

java.lang.Object
  extended byjtge.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.
 
Method Summary
 boolean hasNext()
          
 java.lang.Object next()
          
 void remove()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomIterator

public RandomIterator(IRandom random,
                      java.util.Iterator iterator)
Create a random iterator over a list.

Parameters:
random - the random number generator
iterator - the data to randomize
Method Detail

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.