Package jsl.modeling.elements.variable
Interface CounterActionIfc
-
- All Known Implementing Classes:
AggregateCounter
,Counter
public interface CounterActionIfc
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
addCounterActionListener(CounterActionListenerIfc action)
Adds a counter action listener.void
addStoppingAction()
Tells the Counter to add an CounterActionIfc that will automatically stop the replication when the counter limit is reached.boolean
checkForCounterLimitReachedState()
Returns true if the counter's last observer state is equal to COUNTER_LIMIT_REACHEDdouble
getCounterActionLimit()
boolean
removeCounterActionListener(CounterActionListenerIfc action)
Removes the counter action listener
-
-
-
Method Detail
-
getCounterActionLimit
double getCounterActionLimit()
- Returns:
- Returns the counter's limit.
-
checkForCounterLimitReachedState
boolean checkForCounterLimitReachedState()
Returns true if the counter's last observer state is equal to COUNTER_LIMIT_REACHED- Returns:
-
addStoppingAction
void addStoppingAction()
Tells the Counter to add an CounterActionIfc that will automatically stop the replication when the counter limit is reached.
-
addCounterActionListener
boolean addCounterActionListener(CounterActionListenerIfc action)
Adds a counter action listener. It will be called if the counter's limit is set and it is reached.- Parameters:
action
-- Returns:
-
removeCounterActionListener
boolean removeCounterActionListener(CounterActionListenerIfc action)
Removes the counter action listener- Parameters:
action
-- Returns:
-
-