Package jadex.rules.rulesystem
Class FIFOAgenda
- java.lang.Object
-
- jadex.rules.rulesystem.AbstractAgenda
-
- jadex.rules.rulesystem.FIFOAgenda
-
- All Implemented Interfaces:
IAgenda
public class FIFOAgenda extends AbstractAgenda
FIFO agenda.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set
activations
The activations.protected Activation
next
The 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 FIFOAgenda()
Create a new agenda.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addActivation(Activation act)
Add a new activation.java.util.Collection
getActivations()
Get the current activations.Activation
getNextActivation()
Get the next activation.boolean
isEmpty()
Test if the agenda is empty.void
removeActivation(Activation act)
Remove an activationvoid
setNextActivation(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:
addActivation
in classAbstractAgenda
- Parameters:
act
- The activation.
-
removeActivation
public void removeActivation(Activation act)
Remove an activation- Specified by:
removeActivation
in classAbstractAgenda
- Parameters:
act
- The activation.
-
getActivations
public java.util.Collection getActivations()
Get the current activations.- Specified by:
getActivations
in interfaceIAgenda
- Specified by:
getActivations
in classAbstractAgenda
- Returns:
- The activations.
-
isEmpty
public boolean isEmpty()
Test if the agenda is empty.- Specified by:
isEmpty
in interfaceIAgenda
- Specified by:
isEmpty
in classAbstractAgenda
- Returns:
- True if is empty.
-
getNextActivation
public Activation getNextActivation()
Get the next activation.- Specified by:
getNextActivation
in interfaceIAgenda
- Specified by:
getNextActivation
in classAbstractAgenda
- Returns:
- The next activation.
-
setNextActivation
public void setNextActivation(Activation next)
Set the next activation.- Specified by:
setNextActivation
in interfaceIAgenda
- Specified by:
setNextActivation
in classAbstractAgenda
-
-