Kernel Prolog with Fluent based Builtins

tarau.jinni
Class BlackBoard

java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
              |
              +--tarau.jinni.HashDict
                    |
                    +--tarau.jinni.BlackBoard
Direct Known Subclasses:
DataBase

public class BlackBoard
extends HashDict

This class implementes generic multiple tuples by key operations for use by the PrologBlackBoard class implementing Linda operations on Prolog terms. It uses the Queue class for keeping elemetns of type Term sharing the same key.

See Also:
PrologBlackBoard, Queue, Term, Serialized Form

Fields inherited from class java.util.Hashtable
count, ENTRIES, entrySet, KEYS, keySet, loadFactor, modCount, serialVersionUID, table, threshold, values, VALUES
 
Constructor Summary
BlackBoard()
          creates a new BlackBoard
 
Method Summary
protected  void add(java.lang.String k, Term value)
          Adds a Term or Clause to the the blackboard, to be used by Linda out/1 operation
private  void addBack(java.lang.String k, java.util.Vector V)
           
private  Term pick(java.lang.String k)
          Removes the first Term having key k or the first enumerated key if k is null
protected  Term take(java.lang.String k, Term pattern)
          Removes the first matching Term or Clause from the blackboard, to be used by Linda in/1 operation in PrologBlackBoard
 java.util.Enumeration toEnumeration()
           
 java.util.Enumeration toEnumerationFor(java.lang.String k)
          This gives an enumeration view for the sequence of objects kept under key k.
 
Methods inherited from class tarau.jinni.HashDict
name, stat
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, readObject, rehash, remove, size, toString, values, writeObject
 
Methods inherited from class java.lang.Object
, finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait
 

Constructor Detail

BlackBoard

public BlackBoard()
creates a new BlackBoard
See Also:
Term
Method Detail

pick

private final Term pick(java.lang.String k)
Removes the first Term having key k or the first enumerated key if k is null

addBack

private final void addBack(java.lang.String k,
                           java.util.Vector V)

take

protected final Term take(java.lang.String k,
                          Term pattern)
Removes the first matching Term or Clause from the blackboard, to be used by Linda in/1 operation in PrologBlackBoard
See Also:
PrologBlackBoard#in()

add

protected final void add(java.lang.String k,
                         Term value)
Adds a Term or Clause to the the blackboard, to be used by Linda out/1 operation
See Also:
PrologBlackBoard

toEnumerationFor

public java.util.Enumeration toEnumerationFor(java.lang.String k)
This gives an enumeration view for the sequence of objects kept under key k.

toEnumeration

public java.util.Enumeration toEnumeration()

Kernel Prolog with Fluent based Builtins