com.yahoo.ycsb
Class UniformIntegerGenerator

java.lang.Object
  extended by com.yahoo.ycsb.Generator
      extended by com.yahoo.ycsb.IntegerGenerator
          extended by com.yahoo.ycsb.UniformIntegerGenerator

public class UniformIntegerGenerator
extends IntegerGenerator

Generates integers randomly uniform from an interval.


Constructor Summary
UniformIntegerGenerator(int lb, int ub)
          Creates a generator that will return integers uniformly randomly from the interval [lb,ub] inclusive (that is, lb and ub are possible values)
 
Method Summary
 int nextInt()
          Return the next value as an int.
 
Methods inherited from class com.yahoo.ycsb.IntegerGenerator
lastInt, lastString, nextString, setLastInt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UniformIntegerGenerator

public UniformIntegerGenerator(int lb,
                               int ub)
Creates a generator that will return integers uniformly randomly from the interval [lb,ub] inclusive (that is, lb and ub are possible values)

Parameters:
lb - the lower bound (inclusive) of generated values
ub - the upper bound (inclusive) of generated values
Method Detail

nextInt

public int nextInt()
Description copied from class: IntegerGenerator
Return the next value as an int. When overriding this method, be sure to call setLastString() properly, or the lastString() call won't work.

Specified by:
nextInt in class IntegerGenerator