T - The numeric type (Integer, Long, Double, etc.) of the constant.public class ConstantGenerator<T extends Number> extends 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.
|
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>Copyright © 2025. All rights reserved.