T
- The numeric type (Integer, Long, Double, etc.) of the constant.public class ConstantGenerator<T extends java.lang.Number> extends java.lang.Object implements NumberGenerator<T>
NumberGenerator
that always
returns the same value.Constructor and Description |
---|
ConstantGenerator(T constant)
Creates a number generator that always returns the same
values.
|
Modifier and Type | Method and Description |
---|---|
T |
nextValue() |
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 java.lang.Number>