Class VariateInterval<T>

  • Type Parameters:
    T - the type of the random variate values.
    All Implemented Interfaces:
    Variate<T>

    public final class VariateInterval<T>
    extends java.lang.Object
    implements Variate<T>
    This class represents an interval T-type random variate, where T is an integer type (Integer, Long or BigInteger).
    • Constructor Summary

      Constructors 
      Constructor Description
      VariateInterval​(T min, T max)
      Constructs an interval random variate.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T value()
      Returns a value (instance) of the random variate.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VariateInterval

        public VariateInterval​(T min,
                               T max)
        Constructs an interval random variate.
        Parameters:
        min - the lower bound of the interval.
        max - the upper bound of the interval.
        Throws:
        java.lang.IllegalArgumentException - (1) if min == null or max == null; (2) if min and max have incompatible types; (3) if min > max; (4) if the value type is unsupported.
    • Method Detail

      • value

        public T value()
        Description copied from interface: Variate
        Returns a value (instance) of the random variate.
        Specified by:
        value in interface Variate<T>
        Returns:
        a random variate value.