Class DoublesRandomGenerator

java.lang.Object
org.midheaven.math.DoublesRandomGenerator
All Implemented Interfaces:
IntervalRandomGenerator<Double>, RandomGenerator<Double>

public final class DoublesRandomGenerator extends Object
Generator for Doubles Random values.
  • Method Details

    • compare

      protected int compare(Double a, Double b)
      Performs compare.
      Parameters:
      a - the a value
      b - the b value
      Returns:
      the result of compare
    • next

      public Double next()
      Performs next.
      Returns:
      the result of next
    • next

      protected Double next(Double upperBound)
      Performs next.
      Parameters:
      upperBound - the upperBound value
      Returns:
      the result of next
    • next

      protected Double next(Double lowerBound, Double upperBound)
      Performs next.
      Parameters:
      lowerBound - the lowerBound value
      upperBound - the upperBound value
      Returns:
      the result of next
    • stream

      public Stream<Double> stream()
      Performs stream.
      Returns:
      the result of stream
    • upTo

      public RandomGenerator<Double> upTo(Double upperBound)
      Description copied from interface: IntervalRandomGenerator
      Performs upTo.
      Specified by:
      upTo in interface IntervalRandomGenerator<T>
      Parameters:
      upperBound - the upperBound value
      Returns:
      the result of upTo
    • between

      public RandomGenerator<Double> between(Double lowerBound, Double upperBound)
      Description copied from interface: IntervalRandomGenerator
      Performs between.
      Specified by:
      between in interface IntervalRandomGenerator<T>
      Parameters:
      lowerBound - the lowerBound value
      upperBound - the upperBound value
      Returns:
      the result of between
    • checkBounds

      protected final int checkBounds(Double lowerBound, Double upperBound)
    • base

      protected final Random base()
      Performs base.
      Returns:
      the result of base