All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JIP.engine.JIPTerm

java.lang.Object
   |
   +----JIP.engine.JIPTerm

public class JIPTerm
extends Object
JIPTerm is a wrapper to prolog terms (atom, functor, list, etc.)br>

Version:
4.x.x Home Page : http:\\www.geocities.com\jiprolog
Author:
Ugo Chirico 2000


Method Index

 o getAtom()
Return the corresponding JIPAtom object if the term is a functor otherwise raises an Exception
 o getFunctor()
Return the corresponding JIPFunctor object if the term is a functor otherwise raises an Exception
 o getJIPVariables()
Get an array of JIPVariable containing the variables in the term
 o getList()
Return the corresponding JIPList object if the term is a functor otherwise raises an Exception
 o getNumber()
Return the corresponding JIPNumber object if the term is a functor otherwise raises an Exception
 o getVariable()
Return the corresponding JIPVariable object if the term is a variable otherwise raises an Exception
 o getVariables()
Get an array of string containing the value (as text string) of the variables in the term
 o isAtom()
Checks if the term is an atom
 o isFunctor()
Checks if the term is a functor
 o isList()
Checks if the term is a List
 o isNumber()
Checks if the term is a number
 o isVariable()
Checks if the term is a variable
 o parseQuery(String)
Parses the query passed in the parameter and returns the corresponding JIPTerm The query must end with a "dot".
 o parseTerm(String)
Parses the term passed in the parameter and returns the corresponding JIPTerm
 o toString()
Get a string rapresentation of the term

Methods

 o parseQuery
 public static JIPTerm parseQuery(String strQuery) throws JIPSyntaxErrorException
Parses the query passed in the parameter and returns the corresponding JIPTerm The query must end with a "dot".

Parameters:
strQuery - the query as string
 o parseTerm
 public static JIPTerm parseTerm(String strTerm) throws JIPSyntaxErrorException
Parses the term passed in the parameter and returns the corresponding JIPTerm

Parameters:
strTerm - the term as string
 o isVariable
 public boolean isVariable()
Checks if the term is a variable

 o isFunctor
 public boolean isFunctor()
Checks if the term is a functor

 o isAtom
 public boolean isAtom()
Checks if the term is an atom

 o isNumber
 public boolean isNumber()
Checks if the term is a number

 o isList
 public boolean isList()
Checks if the term is a List

 o getVariable
 public JIPVariable getVariable()
Return the corresponding JIPVariable object if the term is a variable otherwise raises an Exception

See Also:
JIPVariable
 o getFunctor
 public JIPFunctor getFunctor()
Return the corresponding JIPFunctor object if the term is a functor otherwise raises an Exception

See Also:
JIPFunctor
 o getAtom
 public JIPAtom getAtom()
Return the corresponding JIPAtom object if the term is a functor otherwise raises an Exception

See Also:
JIPAtom
 o getList
 public JIPList getList()
Return the corresponding JIPList object if the term is a functor otherwise raises an Exception

See Also:
JIPList
 o getNumber
 public JIPNumber getNumber()
Return the corresponding JIPNumber object if the term is a functor otherwise raises an Exception

See Also:
JIPNumber
 o toString
 public String toString()
Get a string rapresentation of the term

Overrides:
toString in class Object
 o getVariables
 public String[] getVariables()
Get an array of string containing the value (as text string) of the variables in the term

 o getJIPVariables
 public JIPVariable[] getJIPVariables()
Get an array of JIPVariable containing the variables in the term

See Also:
JIPVariable

All Packages  Class Hierarchy  This Package  Previous  Next  Index