|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.ifcomputer.minerva.MinervaTerm
The class MinervaTerm and its subclasses are used
for representing Minerva terms. With this classes you can pass
terms from Java to Minerva and vice versa. However, this term
representation is not used by the Minerva kernel. It will be
transformed in a more compact format, which can be handled more
efficiently by the Minerva engine.
| Field Summary | |
static int |
ATOM
Constant used to specify an Minerva atom |
static int |
COMPOUND
Constant used to specify an Minerva compound term (except lists) |
static int |
DOUBLE
Constant used to specify an Minerva floating point value |
static int |
LIST
Constant used to specify an Minerva list. |
static int |
LONG
Constant used to specify an Minerva integer value |
static int |
OBJECT
Constant used to specify an Java Object wrapped by a Minerva term |
static int |
VARIABLE
Constant used to specify an Minerva variable |
| Constructor Summary | |
MinervaTerm()
|
|
| Method Summary | |
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. |
boolean |
isList()
This function returns true if this is
a Minerva list or a Minerva atom with value []. |
void |
reset()
This function is used to unbind all variables ( MinervaVariable) in this term. |
com.ifcomputer.minerva.MinervaTerm |
resolve()
This function is used to create a copy of this term,
where all bound variable will be replaced by the term to which
they are bound |
void |
setValue(com.ifcomputer.minerva.MinervaTerm term)
This function is only applicable on Minerva variables. |
abstract int |
typeOf()
This function returns the type ( VARIABLE,
ATOM, etc.) of this term. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int VARIABLE
typeOf()public static final int ATOM
typeOf()public static final int LONG
typeOf()public static final int DOUBLE
typeOf()public static final int OBJECT
typeOf()public static final int COMPOUND
typeOf()public static final int LIST
[] is not List
but ATOM
typeOf()| Constructor Detail |
public MinervaTerm()
| Method Detail |
public abstract int typeOf()
VARIABLE,
ATOM, etc.) of this term.
VARIABLE,
ATOM,
LONG,
DOUBLE,
OBJECT,
COMPOUND,
LISTpublic void reset()
MinervaVariable) in this term.
MinervaVariable.setValue(com.ifcomputer.minerva.MinervaTerm)
public void setValue(com.ifcomputer.minerva.MinervaTerm term)
throws java.lang.IllegalArgumentException
MinervaVariable.setValue(com.ifcomputer.minerva.MinervaTerm)public com.ifcomputer.minerva.MinervaTerm resolve()
this term,
where all bound variable will be replaced by the term to which
they are bound
MinervaVariable.setValue(com.ifcomputer.minerva.MinervaTerm),
reset()public boolean isList()
true if this is
a Minerva list or a Minerva atom with value [].
public java.util.Enumeration getEnumeration()
throws java.lang.IllegalArgumentException
this is not a Minerva list then
the function throws an IllegalArgumentException.
public java.lang.String[] getStringArray()
throws java.lang.IllegalArgumentException
this 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.
public com.ifcomputer.minerva.MinervaTerm[] getTermArray()
throws java.lang.IllegalArgumentException
this 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.
public int getListLength()
throws java.lang.IllegalArgumentException
this is not a valid Minerva list, the
function throws an IllegalArgumentException.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||