Class SimRVFactory<T,RV extends RandomVariable<T>,NRV extends SimRandomVariable<T,RV>>

All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
SimBooleanRVFactory, SimDoubleRVFactory, SimIntegerRVFactory, SimLongRVFactory, SimRVRVFactory

public abstract class SimRVFactory<T,RV extends RandomVariable<T>,NRV extends SimRandomVariable<T,RV>> extends DefaultSimObjectFactory<NRV>
Base class for factories for named random variables that produce a sequence of values of a specified type. The type parameters are:
  • T - the type of the values that the random variable generates
  • RV - the type for the random variables generated.
  • NRV - the type of the named random variable corresponding to RV.
  • Constructor Details

    • SimRVFactory

      protected SimRVFactory(Simulation sim)
      Constructor.
      Parameters:
      sim - the simulation used to name objects.
  • Method Details

    • setRV

      protected void setRV(NRV target, RandomVariable<?> rv)
      Set the random variable for the created named random variable. Subclasses that implement NamedObjectFactory are expected to call this method after creating a random variable. in its NamedObjectFactory.initObject(OBJ)} method (which the factory must implement).
      Parameters:
      target - the instance of the subclass of SimRandomVariable being initialized
      rv - the random variable that will provide its behavior.