Class AbstractRandomizer<T>

java.lang.Object
org.jeasy.random.randomizers.AbstractRandomizer<T>
All Implemented Interfaces:
Randomizer<T>
Direct Known Subclasses:
AbstractRangeRandomizer, BigIntegerRandomizer, BooleanRandomizer, CharacterRandomizer, DoubleRandomizer, EnumRandomizer, FloatRandomizer, IntegerRandomizer, LocaleRandomizer, LongRandomizer, NumberRandomizer, OptionalRandomizer, ShortRandomizer, StringRandomizer, TimeZoneRandomizer, UriRandomizer, UrlRandomizer, UUIDRandomizer, ZonedDateTimeRandomizer, ZoneIdRandomizer

public abstract class AbstractRandomizer<T> extends Object implements Randomizer<T>
Base class for Randomizer implementations.
Author:
Mahmoud Ben Hassine ([email protected])
  • Field Details

    • random

      protected final Random random
  • Constructor Details

    • AbstractRandomizer

      protected AbstractRandomizer()
    • AbstractRandomizer

      protected AbstractRandomizer(long seed)
  • Method Details

    • getPredefinedValuesOf

      protected String[] getPredefinedValuesOf(String key)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • nextDouble

      protected double nextDouble(double min, double max)
      Return a random double in the given range.
      Parameters:
      min - value (inclusive)
      max - value (exclusive)
      Returns:
      random double in the given range