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
-
getAtom()
- Return the corresponding JIPAtom object if the term is a functor otherwise raises an Exception
-
getFunctor()
- Return the corresponding JIPFunctor object if the term is a functor otherwise raises an Exception
-
getJIPVariables()
-
Get an array of JIPVariable containing the variables in the term
-
getList()
- Return the corresponding JIPList object if the term is a functor otherwise raises an Exception
-
getNumber()
- Return the corresponding JIPNumber object if the term is a functor otherwise raises an Exception
-
getVariable()
- Return the corresponding JIPVariable object if the term is a variable otherwise raises an Exception
-
getVariables()
-
Get an array of string containing the value (as text string) of the variables in the term
-
isAtom()
- Checks if the term is an atom
-
isFunctor()
- Checks if the term is a functor
-
isList()
- Checks if the term is a List
-
isNumber()
- Checks if the term is a number
-
isVariable()
- Checks if the term is a variable
-
parseQuery(String)
- Parses the query passed in the parameter and returns the corresponding JIPTerm
The query must end with a "dot".
-
parseTerm(String)
- Parses the term passed in the parameter and returns the corresponding JIPTerm
-
toString()
-
Get a string rapresentation of the term
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
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
isVariable
public boolean isVariable()
- Checks if the term is a variable
isFunctor
public boolean isFunctor()
- Checks if the term is a functor
isAtom
public boolean isAtom()
- Checks if the term is an atom
isNumber
public boolean isNumber()
- Checks if the term is a number
isList
public boolean isList()
- Checks if the term is a List
getVariable
public JIPVariable getVariable()
- Return the corresponding JIPVariable object if the term is a variable otherwise raises an Exception
- See Also:
- JIPVariable
getFunctor
public JIPFunctor getFunctor()
- Return the corresponding JIPFunctor object if the term is a functor otherwise raises an Exception
- See Also:
- JIPFunctor
getAtom
public JIPAtom getAtom()
- Return the corresponding JIPAtom object if the term is a functor otherwise raises an Exception
- See Also:
- JIPAtom
getList
public JIPList getList()
- Return the corresponding JIPList object if the term is a functor otherwise raises an Exception
- See Also:
- JIPList
getNumber
public JIPNumber getNumber()
- Return the corresponding JIPNumber object if the term is a functor otherwise raises an Exception
- See Also:
- JIPNumber
toString
public String toString()
- Get a string rapresentation of the term
- Overrides:
- toString in class Object
getVariables
public String[] getVariables()
- Get an array of string containing the value (as text string) of the variables in the term
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