edu.usc.bg.base.generator
Class UniformGenerator

java.lang.Object
  extended by edu.usc.bg.base.generator.Generator
      extended by edu.usc.bg.base.generator.UniformGenerator

public class UniformGenerator
extends Generator

An expression that generates a random integer in the specified range


Constructor Summary
UniformGenerator(java.util.Vector<java.lang.String> values)
          Creates a generator that will return strings from the specified set uniformly randomly
 
Method Summary
 java.lang.String lastString()
          Return the previous string generated by the distribution; e.g., returned from the last nextString() call.
 java.lang.String nextString()
          Generate the next string in the distribution.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UniformGenerator

public UniformGenerator(java.util.Vector<java.lang.String> values)
Creates a generator that will return strings from the specified set uniformly randomly

Method Detail

nextString

public java.lang.String nextString()
Generate the next string in the distribution.

Specified by:
nextString in class Generator

lastString

public java.lang.String lastString()
Return the previous string generated by the distribution; e.g., returned from the last nextString() call. Calling lastString() should not advance the distribution or have any side effects. If nextString() has not yet been called, lastString() should return something reasonable.

Specified by:
lastString in class Generator