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

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

public class NumberSequenceGenerator
extends java.lang.Object
implements SequenceGenerator

Project:
TestDataLoader
Filename:
NumberSequenceGenerator.java
Creation Date:
25 May 2008
A class that generates an incrementing sequence of numbers. This implementation will loop back to the start value when the end value is reached.

Author:
Bryan Ray

Constructor Summary
NumberSequenceGenerator(java.util.List<java.lang.String> args)
           
 
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

NumberSequenceGenerator

public NumberSequenceGenerator(java.util.List<java.lang.String> args)
Parameters:
args - A List of two values:
  1. The start value.
  2. The end value.
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.