|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.agentfactory.cldc.logic.FOS
public class FOS
The first order structure class represents one of the primary logical componsents of Agent Factory/AFME. It provides an abstract or symbolic representation of the information content.
| Field Summary | |
|---|---|
static char |
CLOSE_BRACKET
|
static char |
OPEN_BRACKET
|
| Method Summary | |
|---|---|
void |
addToTable(java.util.Hashtable table,
java.lang.Object object)
Adds the specified object to the hash table using the functor of the first order structure as the key. |
void |
append(java.lang.StringBuffer buffer)
Appends the first order structure to the specified string buffer. |
FOS |
apply(SubstitutionSet sub)
Applies the specified substitution set to the first order structure. |
void |
buildSet(FOS fos,
SubstitutionSet solution)
Applies the substitution set to the arguments of this first order structure and to the arguments of the specified first order structure. |
boolean |
containsChar(char c)
Checks whether the first order structure contains the specified character. |
static FOS |
createFOS(java.lang.String string)
Creates a first order structure from the specified string represention if the string does not represent a variable. |
boolean |
equals(FOS fos)
Checks whether this first order structure is equal to the specified first order structure. |
boolean |
functorEquals(java.lang.Object object)
Tests whether the functor equals the specified object. |
boolean |
functorStartsWith(java.lang.String string)
Checks whether the functor of this first order structure starts with the specified string. |
java.lang.Object |
getFromTable(java.util.Hashtable table)
Obtains the object from the hash table whose key is the functor of the first order structure. |
int |
hashCode()
Returns the hash code for the first order structure. |
boolean |
hasNext()
Tests if the first order structure has more arguments. |
FOS |
invert()
Returns an inverted first order structure. |
boolean |
isNot()
Tests whether this is an inverted first order structure. |
boolean |
isTrue()
Test whether this is a true first order structure. |
boolean |
matches(FOS f)
Tests whether this first order structure matches the specified first order structure. |
FOS |
next()
Returns the next argument in the first order structure and increments the internal counter, which is used to determine the current argument. |
java.lang.Object |
removeFromTable(java.util.Hashtable table)
Removes the object from the hash table whose key is the functor of this first order structure. |
void |
reset()
Resets the first order structure to the state in which the next method has never been called. |
java.lang.String |
toString()
converts this first order structure to a string. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final char OPEN_BRACKET
public static final char CLOSE_BRACKET
| Method Detail |
|---|
public static FOS createFOS(java.lang.String string)
throws MalformedLogicException
string - the specified string representation.
MalformedLogicException - if there is a logic error.public FOS invert()
public boolean isNot()
public boolean hasNext()
public FOS next()
public void reset()
public boolean containsChar(char c)
c - the character to check for.
public boolean functorEquals(java.lang.Object object)
object - the object to compare the functor to.
public java.lang.Object removeFromTable(java.util.Hashtable table)
table - the hash table to remove the object from.
public void addToTable(java.util.Hashtable table,
java.lang.Object object)
table - the table the object is to be added to.object - the object to add to the table.public java.lang.Object getFromTable(java.util.Hashtable table)
table - the hash table to obtain the object from.
public boolean isTrue()
public boolean matches(FOS f)
f - the specified first order structure.
public void buildSet(FOS fos,
SubstitutionSet solution)
fos - the first order structure used to build the set mappings.solution - the substitution set being built.public FOS apply(SubstitutionSet sub)
sub - the specified substitution set.
public void append(java.lang.StringBuffer buffer)
buffer - the string buffer that the first order structure is appended to.public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean functorStartsWith(java.lang.String string)
string - the specified string.
public boolean equals(FOS fos)
fos - the specified first order structure.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||