Class AggregateCounter

    • Field Detail

      • myAggCounter

        protected Counter myAggCounter
        This is used to remember the aggregate value when any of its aggregatable's change
    • Constructor Detail

      • AggregateCounter

        public AggregateCounter​(ModelElement parent)
        Parameters:
        parent -
      • AggregateCounter

        public AggregateCounter​(ModelElement parent,
                                java.lang.String name)
        Parameters:
        parent -
        name -
    • Method Detail

      • getPreviousValue

        public double getPreviousValue()
        Description copied from interface: PreviousValueIfc
        Gets the previous number from the sequence of values
        Specified by:
        getPreviousValue in interface PreviousValueIfc
        Returns:
        a double representing the last value in the sequence
      • getValue

        public double getValue()
        Description copied from interface: GetValueIfc
        This method simply returns the value.
        Specified by:
        getValue in interface GetValueIfc
        Returns:
        The value.
      • valueChangedBeforeReplication

        protected void valueChangedBeforeReplication​(Aggregatable variable)
        Description copied from class: Aggregate
        Sub-classes must implement this method to properly react to a change in the variable with respect to its form of aggregation
        Specified by:
        valueChangedBeforeReplication in class Aggregate
        Parameters:
        variable - The variable that has just changed
      • variableAddedBeforeReplication

        protected void variableAddedBeforeReplication​(Aggregatable variable)
        Description copied from class: Aggregate
        Sub-classes must implement this method to properly react to the subscription of a new variable to the aggregate. Note that the variable is already in the aggregate's list of variables when this method is invoked
        Specified by:
        variableAddedBeforeReplication in class Aggregate
        Parameters:
        variable - The variable that has been added to the aggregate
      • variableRemovedBeforeReplication

        protected void variableRemovedBeforeReplication​(Aggregatable variable)
        Description copied from class: Aggregate
        Sub-classes must implement this method to properly react to the removal of a variable from the aggregate. Note that the variable is no longer in the aggregate's list of variables when this method is invoked
        Specified by:
        variableRemovedBeforeReplication in class Aggregate
        Parameters:
        variable - The variable that has been removed from the aggregate
      • addStoppingAction

        public void addStoppingAction()
        Description copied from interface: CounterActionIfc
        Tells the Counter to add an CounterActionIfc that will automatically stop the replication when the counter limit is reached.
        Specified by:
        addStoppingAction in interface CounterActionIfc
      • valueChangedDuringReplication

        protected void valueChangedDuringReplication​(Aggregatable variable)
        Description copied from class: Aggregate
        Sub-classes must implement this method to properly react to a change in the variable with respect to its form of aggregation
        Specified by:
        valueChangedDuringReplication in class Aggregate
        Parameters:
        variable - The variable that has just changed
      • variableAddedDuringReplication

        protected void variableAddedDuringReplication​(Aggregatable variable)
        Description copied from class: Aggregate
        Sub-classes must implement this method to properly react to the subscription of a new variable to the aggregate. Note that the variable is already in the aggregate's list of variables when this method is invoked
        Specified by:
        variableAddedDuringReplication in class Aggregate
        Parameters:
        variable - The variable that has been added to the aggregate
      • variableRemovedDuringReplication

        protected void variableRemovedDuringReplication​(Aggregatable variable)
        Description copied from class: Aggregate
        Sub-classes must implement this method to properly react to the removal of a variable from the aggregate. Note that the variable is no longer in the aggregate's list of variables when this method is invoked
        Specified by:
        variableRemovedDuringReplication in class Aggregate
        Parameters:
        variable - The variable that has been removed from the aggregate
      • initializeAggregate

        protected void initializeAggregate()
        Description copied from class: Aggregate
        Sub-classes must implement this method to properly initialize the aggregate after all its variables have been initialized
        Specified by:
        initializeAggregate in class Aggregate
      • warmUpAggregate

        protected void warmUpAggregate()
        Description copied from class: Aggregate
        Sub-classes must implement this method to properly warm up the aggregate after all its variables have been warmed up
        Specified by:
        warmUpAggregate in class Aggregate
      • removedFromModel

        protected void removedFromModel()
        Description copied from class: Aggregatable
        This method should be overridden by subclasses that need actions performed when a model element is removed from a model after the replication has started.
        Overrides:
        removedFromModel in class Aggregatable