Class VariateCollection<T>

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

    public final class VariateCollection<T>
    extends java.lang.Object
    implements Variate<T>
    This class represents a finite-set T-type random variate.
    • Constructor Summary

      Constructors 
      Constructor Description
      VariateCollection​(java.util.Collection<T> values)
      Constructs a finite-set random variate.
      VariateCollection​(T[] values)
      Constructs a finite-set 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

      • VariateCollection

        public VariateCollection​(T[] values)
        Constructs a finite-set random variate.
        Parameters:
        values - the value area of the random variate.
        Throws:
        java.lang.IllegalArgumentException - if values == null; if values is empty.
      • VariateCollection

        public VariateCollection​(java.util.Collection<T> values)
        Constructs a finite-set random variate.
        Parameters:
        values - the value area of the random variate.
        Throws:
        java.lang.IllegalArgumentException - if values == null; if values is empty.
    • 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.