uk.org.bryanray.testtoys.generator.sequencegenerators
Class RandomEnumerationGenerator

java.lang.Object
  extended by uk.org.bryanray.testtoys.generator.sequencegenerators.RandomEnumerationGenerator
All Implemented Interfaces:
SequenceGenerator

public class RandomEnumerationGenerator
extends java.lang.Object
implements SequenceGenerator

Project:
TestDataLoader
Filename:
RandomEnumerationGenerator.java
Creation Date:
29 May 2008
A sequence generator that serves up a list of values in a random order.

Author:
Bryan Ray

Constructor Summary
RandomEnumerationGenerator(java.util.List<java.lang.String> enumeration)
           
 
Method Summary
 void next()
          Moves the sequence on one value.
 java.lang.String value()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomEnumerationGenerator

public RandomEnumerationGenerator(java.util.List<java.lang.String> enumeration)
Parameters:
enumeration - A list of values to use as the enumeration.
Method Detail

next

public void next()
Moves the sequence on one value.

Specified by:
next in interface SequenceGenerator

value

public java.lang.String value()

Specified by:
value in interface SequenceGenerator
Returns:
The current sequence value. This method should be ready to call immediately after initialisation of the instance object.


Copyright © 2008. All Rights Reserved.