|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.ifcomputer.minerva.MinervaTerm
|
+--com.ifcomputer.minerva.MinervaAtom
The class MinervaAtom is used to represent a Minerva atom.
| Field Summary |
| Fields inherited from class com.ifcomputer.minerva.MinervaTerm |
ATOM, COMPOUND, DOUBLE, LIST, LONG, OBJECT, VARIABLE |
| Constructor Summary | |
MinervaAtom(java.lang.String name)
Constructs an MinervaAtom. |
|
| Method Summary | |
boolean |
equals(java.lang.Object other)
This function compares two terms. |
java.util.Enumeration |
getEnumeration()
This functions returns an enumeration for the elements of a Minerva list. |
int |
getListLength()
This function returns the length of a Minerva list. |
java.lang.String[] |
getStringArray()
If this is a Minerva list, then the function
returns a list of strings, representing each element of
the list. |
com.ifcomputer.minerva.MinervaTerm[] |
getTermArray()
If this is a Minerva list, then the function
returns a list of Minerva terms, containing all elements of
the list. |
int |
hashCode()
This function returns a hashcode for an atom (based on the external representation of the atom). |
boolean |
hasMoreElements()
This function is used to implement the Enumeration
interface. |
boolean |
isList()
This function returns true if this is
a Minerva list or a Minerva atom with value []. |
java.lang.Object |
nextElement()
|
java.lang.String |
stringValue()
This function returns the external representation of the atom. |
java.lang.String |
toString()
This function returns the external representation of the atom. |
int |
typeOf()
This function returns the type ( VARIABLE,
ATOM, etc.) of this term. |
| Methods inherited from class com.ifcomputer.minerva.MinervaTerm |
reset, resolve, setValue |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public MinervaAtom(java.lang.String name)
MinervaAtom.
name - The external representation of the atom.| Method Detail |
public boolean equals(java.lang.Object other)
true, otherwise the function returns false.
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String stringValue()
public java.lang.String toString()
toString in class java.lang.Objectpublic int typeOf()
MinervaTermVARIABLE,
ATOM, etc.) of this term.
typeOf in class MinervaTermMinervaTerm.VARIABLE,
MinervaTerm.ATOM,
MinervaTerm.LONG,
MinervaTerm.DOUBLE,
MinervaTerm.OBJECT,
MinervaTerm.COMPOUND,
MinervaTerm.LISTpublic boolean isList()
MinervaTermtrue if this is
a Minerva list or a Minerva atom with value [].
isList in class MinervaTermpublic java.lang.String[] getStringArray()
MinervaTermthis is a Minerva list, then the function
returns a list of strings, representing each element of
the list. If this is not a Minerva list, then
the function throws an IllegalArgumentException.
getStringArray in class MinervaTermpublic com.ifcomputer.minerva.MinervaTerm[] getTermArray()
MinervaTermthis is a Minerva list, then the function
returns a list of Minerva terms, containing all elements of
the list. If this is not a Minerva list, then
the function throws an IllegalArgumentException.
getTermArray in class MinervaTerm
public int getListLength()
throws java.lang.IllegalArgumentException
MinervaTermthis is not a valid Minerva list, the
function throws an IllegalArgumentException.
getListLength in class MinervaTermjava.lang.IllegalArgumentException
public java.util.Enumeration getEnumeration()
throws java.lang.IllegalArgumentException
MinervaTermthis is not a Minerva list then
the function throws an IllegalArgumentException.
getEnumeration in class MinervaTermjava.lang.IllegalArgumentExceptionpublic boolean hasMoreElements()
Enumeration
interface. The function returns true, if there
are more elements in the enumeration; otherwise it returns
false
hasMoreElements in interface java.util.EnumerationgetEnumeration()public java.lang.Object nextElement()
nextElement in interface java.util.Enumeration
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||