T - The numeric type (Integer, Long, Double, etc.) of the constant.NumberGenerator<T>public class ConstantGenerator<T extends Number> extends Object implements NumberGenerator<T>
NumberGenerator that always
returns the same value.| Constructor | Description |
|---|---|
ConstantGenerator(T constant) |
Creates a number generator that always returns the same
values.
|
public ConstantGenerator(T constant)
constant - The value to be returned by all invocations
of the nextValue() method.public T nextValue()
nextValue in interface NumberGenerator<T extends Number>