com.ifcomputer.minerva
Class MinervaStruct
java.lang.Object
|
+--com.ifcomputer.minerva.MinervaTerm
|
+--com.ifcomputer.minerva.MinervaStruct
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- MinervaCompound, MinervaList
- public abstract class MinervaStruct
- extends MinervaTerm
- implements java.io.Serializable
The class MinervStruct is used as base class for
compound and list terms.
- See Also:
MinervaCompound,
MinervaList, Serialized Form
|
Method Summary |
abstract com.ifcomputer.minerva.MinervaTerm |
getArg(int i)
This function retrieves the i-th argument of a compound term. |
abstract int |
getArity()
This function retrieves the arity of a compound term. |
abstract java.lang.String |
getFunctor()
This function retrieves the functor of a compound term. |
abstract void |
setArg(int i,
com.ifcomputer.minerva.MinervaTerm term)
This function replaces the i-th argument of a compound term
by 'term'. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MinervaStruct
public MinervaStruct()
getFunctor
public abstract java.lang.String getFunctor()
- This function retrieves the functor of a compound term.
getArity
public abstract int getArity()
- This function retrieves the arity of a compound term.
getArg
public abstract com.ifcomputer.minerva.MinervaTerm getArg(int i)
- This function retrieves the i-th argument of a compound term.
- Parameters:
i - argument index (0 <= index < arity)- Returns:
- i-th argument of the compound term
setArg
public abstract void setArg(int i,
com.ifcomputer.minerva.MinervaTerm term)
- This function replaces the i-th argument of a compound term
by 'term'.
- Parameters:
i - argument index (0 <= index < arity)term - term by which the selected argument has to be replaced