org.blackbox.shell
Class BBX_Agenda

java.lang.Object
  extended by org.blackbox.shell.ObserverPatternImpl
      extended by org.blackbox.shell.BBX_Agenda
All Implemented Interfaces:
Agenda, ObservableEntity, org.framboise_22.rete.util.Observer

public final class BBX_Agenda
extends ObserverPatternImpl
implements Agenda, org.framboise_22.rete.util.Observer


Field Summary
 
Fields inherited from class org.blackbox.shell.ObserverPatternImpl
curEvent
 
Fields inherited from interface org.blackbox.model.Agenda
MAX_SALIENCE
 
Constructor Summary
BBX_Agenda()
           
 
Method Summary
 boolean empty()
          Anwser the question : is this queue empty.
 int getCurrentSalience()
           
 java.util.Iterator iterator()
          Agenda iterator
 void manageAgenda()
          When called this fn (re)-arrays the agenda if necessary.
 KSAR peekKSAR()
          Peek the best next KSAR (this one which is located at the top of the agenda).
 void popKSAR()
          Remove the top of the agenda.
 void pushKSAR(KSAR ksar)
          Add a new KSAR to execution list.
 void setCurrentSalienceTo(int salience)
           
 int size()
          Return current number of ksar occurences in this queue.
 void update(java.lang.Object update)
           
 
Methods inherited from class org.blackbox.shell.ObserverPatternImpl
addObserver, notifyObservers, removeObserver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.blackbox.model.ObservableEntity
addObserver, removeObserver
 

Constructor Detail

BBX_Agenda

public BBX_Agenda()
Method Detail

setCurrentSalienceTo

public void setCurrentSalienceTo(int salience)
Specified by:
setCurrentSalienceTo in interface Agenda

getCurrentSalience

public int getCurrentSalience()
Specified by:
getCurrentSalience in interface Agenda

popKSAR

public void popKSAR()
Description copied from interface: Agenda
Remove the top of the agenda.

Specified by:
popKSAR in interface Agenda

pushKSAR

public void pushKSAR(KSAR ksar)
Description copied from interface: Agenda
Add a new KSAR to execution list.

Specified by:
pushKSAR in interface Agenda

peekKSAR

public KSAR peekKSAR()
Description copied from interface: Agenda
Peek the best next KSAR (this one which is located at the top of the agenda).

Specified by:
peekKSAR in interface Agenda
Returns:
the best best next KSAR.

iterator

public java.util.Iterator iterator()
Description copied from interface: Agenda
Agenda iterator

Specified by:
iterator in interface Agenda
Returns:
an iterator on the content.

empty

public boolean empty()
Description copied from interface: Agenda
Anwser the question : is this queue empty.

Specified by:
empty in interface Agenda
Returns:
true if the queue is empty.

manageAgenda

public void manageAgenda()
Description copied from interface: Agenda
When called this fn (re)-arrays the agenda if necessary.

Specified by:
manageAgenda in interface Agenda

size

public int size()
Description copied from interface: Agenda
Return current number of ksar occurences in this queue.

Specified by:
size in interface Agenda

update

public void update(java.lang.Object update)
Specified by:
update in interface org.framboise_22.rete.util.Observer