sdsu.algorithms.data
Class IntegerObjectGenerator

java.lang.Object
  |
  +--sdsu.algorithms.data.IntegerObjectGenerator

public class IntegerObjectGenerator
extends java.lang.Object
implements ObjectGenerator

Converts a sequence of numbers to a sequence of Integer objects. Uses a NumberGenerator to actually generate the sequence. The class wraps the number in an Integer object. The numbers generated be the NumberGenerator are cast to an int.

Version:
1.0 19 June 1997
Author:
Roger Whitney (whitney@cs.sdsu.edu)
See Also:
sdsu.data.ObjectGenerator, sdsu.data.NumberGenerator

Constructor Summary
IntegerObjectGenerator(NumberGenerator aGenerator)
          Create an IntegerObjectGenerator which uses aGenerator to generate the actual sequence of numbers.
 
Method Summary
 java.lang.Object nextElement()
          Returns the next int in the sequence.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntegerObjectGenerator

public IntegerObjectGenerator(NumberGenerator aGenerator)
Create an IntegerObjectGenerator which uses aGenerator to generate the actual sequence of numbers.
Method Detail

nextElement

public java.lang.Object nextElement()
Returns the next int in the sequence. The int is rapped in an Integer object.
Specified by:
nextElement in interface ObjectGenerator