Class AbstractIntegerCondFactory<Obj extends IntegerCondition>

All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
IntegerConditionFactory

public abstract class AbstractIntegerCondFactory<Obj extends IntegerCondition> extends AbstractConditionFactory<Obj>
Simulation factory for subclasses of IntegerCondition.

Generally, there will be a class hierarchy of abstract factories matching the class hierarchy for subclasses of the class a factory creates, each responsible for providing parameters for the corresponding subclass. In addition, there will typically be a factory that is not abstract for each class that can be created.

The factory parameters this factory provides are the same as the parameters provided by its subclass IntegerConditionFactory:

  • Constructor Details

    • AbstractIntegerCondFactory

      protected AbstractIntegerCondFactory(DramaSimulation sim)
      Constructor. Subclasses must call this constructor.
      Parameters:
      sim - the simulation
  • Method Details

    • initInitialValueParm

      protected void initInitialValueParm(Integer min, boolean minClosed, Integer max, boolean maxClosed, int defaultInitialValue)
      Add the initialValue parameter. This should be called by a subclass' constructor immediately after the superclass' constructor is called.
      Parameters:
      min - the minimum value; null if there is no lower bound
      minClosed - true if min is included in the range of acceptable values; false otherwise
      max - the maximum value; null if there is no upper bound
      maxClosed - true if max is included in the range of acceptable values; false otherwise
      defaultInitialValue - the default initial value.
    • clear

      public void clear()
      Description copied from class: NamedObjectFactory
      Clear all entries and restore to default values. Note: each subclass that implements this method should call super.clear(). Any subclass that defines parameters should call this method in order to restore the parameters to their default values. When an annotation processor is used for some parameters, those parameters can be restored to their default value by calling the parm manager's setDefaults method with the factory as its argument.
      Overrides:
      clear in class SimObjectFactory<AbstractConditionFactory<Obj extends IntegerCondition>,DramaSimulation,Obj extends IntegerCondition>
    • addToTimelineRequest

      protected void addToTimelineRequest(Obj object, int key, double time)
      Description copied from class: SimObjectFactory
      Request subclasses to add entries to the timeline. Each subclass adding entries should create a Callable that performs any necessary operations at the specified time, and that Callable should be returned via a call to addToTimelineResponse. Each subclass that implements addToTimelineRequest must call super.addToTimelineRequest(object, key, time) as the first statement in addToTimelineRequest.
      Overrides:
      addToTimelineRequest in class SimObjectFactory<AbstractConditionFactory<Obj extends IntegerCondition>,DramaSimulation,Obj extends IntegerCondition>
      Parameters:
      object - the object being configured.
      key - the timeline key
      time - the time for the timeline entry
    • initObject

      protected void initObject(Obj object)
      Description copied from class: NamedObjectFactory
      Initialize an object. This method will call the methods for the object necessary to initialize it based on how the factory was configured, and is called by createObject() and createObjects unless these methods are overridden. The default method does nothing. Subclasses that override this method to provide subclass-specific initializations must start with the statement "super.initObject(object);".
      Overrides:
      initObject in class SimObjectFactory<AbstractConditionFactory<Obj extends IntegerCondition>,DramaSimulation,Obj extends IntegerCondition>
      Parameters:
      object - the object to initialize