Class ConstantRandomizer<T>

java.lang.Object
org.jeasy.random.randomizers.misc.ConstantRandomizer<T>
All Implemented Interfaces:
Randomizer<T>

public class ConstantRandomizer<T> extends Object implements Randomizer<T>
A Randomizer that generates constant values. Yeah.. That's not random :-)
Author:
Mahmoud Ben Hassine ([email protected])
  • Constructor Details

    • ConstantRandomizer

      public ConstantRandomizer(T value)
      Create a new ConstantRandomizer.
      Parameters:
      value - the constant value
  • Method Details

    • getRandomValue

      public T getRandomValue()
      Description copied from interface: Randomizer
      Generate a random value for the given type.
      Specified by:
      getRandomValue in interface Randomizer<T>
      Returns:
      a random value for the given type