public class PriorityAgenda extends AbstractAgenda
| Modifier and Type | Field and Description |
|---|---|
protected java.util.TreeSet |
activations
The activations.
|
protected long |
count
The current count.
|
protected java.util.Map |
counts
The map containing the activation order count (for FIFO in case two activations are equal).
|
protected Activation |
next
The next activation (selected by strategy or manually form outside for debugging).
|
history, last, listeners, state| Constructor and Description |
|---|
PriorityAgenda()
Create a new agenda.
|
| Modifier and Type | Method and 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 activation
|
void |
setNextActivation(Activation next)
Set the next activation.
|
addAgendaListener, fireRule, getHistory, getLastActivation, getState, isHistoryEnabled, notifyListeners, removeAgendaListener, setHistoryEnabled, toStringprotected java.util.TreeSet activations
protected Activation next
protected java.util.Map counts
protected long count
public void addActivation(Activation act)
addActivation in class AbstractAgendaact - The activation.public void removeActivation(Activation act)
removeActivation in class AbstractAgendaact - The activation.public java.util.Collection getActivations()
getActivations in interface IAgendagetActivations in class AbstractAgendapublic boolean isEmpty()
isEmpty in interface IAgendaisEmpty in class AbstractAgendapublic Activation getNextActivation()
getNextActivation in interface IAgendagetNextActivation in class AbstractAgendapublic void setNextActivation(Activation next)
setNextActivation in interface IAgendasetNextActivation in class AbstractAgenda