org.dolben.MarkN
Class RandomDeal

java.lang.Object
  extended by org.dolben.MarkN.RandomDeal

 class RandomDeal
extends java.lang.Object

This is a pseudorandom order generator for some number integers. For example, if the number of items is 10, the sequence obtained by calls of next() will be some pseudorandom permutation of 0 to 9.


Constructor Summary
RandomDeal(int n)
          constructs a new pseudorandom order generator
 
Method Summary
(package private)  int next()
          gets the next item in the sequence
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomDeal

RandomDeal(int n)
constructs a new pseudorandom order generator

Parameters:
n - the number of items in the sequence
Method Detail

next

int next()
gets the next item in the sequence

Returns:
the next item