com.ifcomputer.minerva
Class MinervaVariable

java.lang.Object
  |
  +--com.ifcomputer.minerva.MinervaTerm
        |
        +--com.ifcomputer.minerva.MinervaVariable
All Implemented Interfaces:
java.io.Serializable

public class MinervaVariable
extends MinervaTerm
implements java.io.Serializable

The class MinervaVariable is used to represent a Minerva variable.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ifcomputer.minerva.MinervaTerm
ATOM, COMPOUND, DOUBLE, LIST, LONG, OBJECT, VARIABLE
 
Constructor Summary
MinervaVariable()
          Constructs a new unbound Minerva variable
 
Method Summary
 com.ifcomputer.minerva.MinervaTerm getValue()
          This function returns the term, which has been bound to the variable.
 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 used to bind a Minerva variable to a term.
 java.lang.String toString()
          This function stringifies the term into a format readable by the Minerva read predicates.
 int typeOf()
          This function returns the type (VARIABLE, ATOM, etc.) of this term.
 
Methods inherited from class com.ifcomputer.minerva.MinervaTerm
getEnumeration, getListLength, getStringArray, getTermArray, isList
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MinervaVariable

public MinervaVariable()
Constructs a new unbound Minerva variable

Method Detail

reset

public void reset()
Description copied from class: MinervaTerm
This function is used to unbind all variables (MinervaVariable) in this term.

Overrides:
reset in class MinervaTerm
See Also:
setValue(com.ifcomputer.minerva.MinervaTerm)

resolve

public com.ifcomputer.minerva.MinervaTerm resolve()
Description copied from class: MinervaTerm
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

Overrides:
resolve in class MinervaTerm
See Also:
setValue(com.ifcomputer.minerva.MinervaTerm), MinervaTerm.reset()

setValue

public void setValue(com.ifcomputer.minerva.MinervaTerm term)
This function is used to bind a Minerva variable to a term.

Overrides:
setValue in class MinervaTerm
Parameters:
term - the term to which the Minerva variable should be bound.
See Also:
setValue(com.ifcomputer.minerva.MinervaTerm)

getValue

public com.ifcomputer.minerva.MinervaTerm getValue()
This function returns the term, which has been bound to the variable. If there is no term, bound to the variable, the function returns null.

See Also:
setValue(com.ifcomputer.minerva.MinervaTerm)

toString

public java.lang.String toString()
This function stringifies the term into a format readable by the Minerva read predicates.

Overrides:
toString in class java.lang.Object

typeOf

public int typeOf()
Description copied from class: MinervaTerm
This function returns the type (VARIABLE, ATOM, etc.) of this term.

Specified by:
typeOf in class MinervaTerm
See Also:
MinervaTerm.VARIABLE, MinervaTerm.ATOM, MinervaTerm.LONG, MinervaTerm.DOUBLE, MinervaTerm.OBJECT, MinervaTerm.COMPOUND, MinervaTerm.LIST