Package jadex.rules.rulesystem
Class LIFOAgenda
- java.lang.Object
-
- jadex.rules.rulesystem.AbstractAgenda
-
- jadex.rules.rulesystem.LIFOAgenda
-
- All Implemented Interfaces:
IAgenda
public class LIFOAgenda extends AbstractAgenda
LIFO agenda.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.SetactivationsThe activations.protected ActivationnextThe next activation (selected by strategy or manually form outside for debugging).-
Fields inherited from class jadex.rules.rulesystem.AbstractAgenda
history, last, listeners, state
-
-
Constructor Summary
Constructors Constructor Description LIFOAgenda()Create a new agenda.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddActivation(Activation act)Add a new activation.java.util.CollectiongetActivations()Get the current activations.ActivationgetNextActivation()Get the next activation.booleanisEmpty()Test if the agenda is empty.voidremoveActivation(Activation act)Remove an activationvoidsetNextActivation(Activation next)Set the next activation.-
Methods inherited from class jadex.rules.rulesystem.AbstractAgenda
addAgendaListener, fireRule, getHistory, getLastActivation, getState, isHistoryEnabled, notifyListeners, removeAgendaListener, setHistoryEnabled, toString
-
-
-
-
Field Detail
-
activations
protected java.util.Set activations
The activations.
-
next
protected Activation next
The next activation (selected by strategy or manually form outside for debugging).
-
-
Method Detail
-
addActivation
public void addActivation(Activation act)
Add a new activation.- Specified by:
addActivationin classAbstractAgenda- Parameters:
act- The activation.
-
removeActivation
public void removeActivation(Activation act)
Remove an activation- Specified by:
removeActivationin classAbstractAgenda- Parameters:
act- The activation.
-
getActivations
public java.util.Collection getActivations()
Get the current activations.- Specified by:
getActivationsin interfaceIAgenda- Specified by:
getActivationsin classAbstractAgenda- Returns:
- The activations.
-
isEmpty
public boolean isEmpty()
Test if the agenda is empty.- Specified by:
isEmptyin interfaceIAgenda- Specified by:
isEmptyin classAbstractAgenda- Returns:
- True if is empty.
-
getNextActivation
public Activation getNextActivation()
Get the next activation.- Specified by:
getNextActivationin interfaceIAgenda- Specified by:
getNextActivationin classAbstractAgenda- Returns:
- The next activation.
-
setNextActivation
public void setNextActivation(Activation next)
Set the next activation.- Specified by:
setNextActivationin interfaceIAgenda- Specified by:
setNextActivationin classAbstractAgenda
-
-