prolog.model
Interface IStatementMap

All Known Implementing Classes:
StatementMap

public interface IStatementMap

The statementmap stores statements under their name. It is a collection with statements but for faster access from the interpreter, they are stored in a map to prevent iterations.


Method Summary
 void addStatement(IStatement statement)
          adds a statement to the statementmap
 void clear()
          clears the statement map
 void genXml(java.io.Writer out, ISymbolTable table)
          generates a xml representation with decoded symbols
 IStatement getMatchingStatement(IFact fact)
          returns a statement matching the given fact, if one was found.
 IStatement getStatement(int key)
          returns the statement for the given name
 java.util.Iterator getStatements()
          returns a iterator over all stored statements
 java.lang.String toString(ISymbolTable table)
          returns a string representation with decoded symbols
 

Method Detail

clear

public void clear()
clears the statement map

getStatements

public java.util.Iterator getStatements()
returns a iterator over all stored statements

getStatement

public IStatement getStatement(int key)
returns the statement for the given name
Parameters:
key - is the name
Returns:
a statement if one was found ;-)

addStatement

public void addStatement(IStatement statement)
adds a statement to the statementmap

getMatchingStatement

public IStatement getMatchingStatement(IFact fact)
returns a statement matching the given fact, if one was found.

genXml

public void genXml(java.io.Writer out,
                   ISymbolTable table)
            throws java.io.IOException
generates a xml representation with decoded symbols
Parameters:
out -  
table -  
Throws:
java.io.IOException -  

toString

public java.lang.String toString(ISymbolTable table)
returns a string representation with decoded symbols
Parameters:
table -  
Returns: