com.ugos.JIProlog.engine
Class JIPClause

java.lang.Object
  |
  +--com.ugos.JIProlog.engine.JIPTerm
        |
        +--com.ugos.JIProlog.engine.JIPClause
All Implemented Interfaces:
com.ugos.JIProlog.engine.Clearable, java.lang.Cloneable, java.io.Serializable

public class JIPClause
extends JIPTerm

JIPClause wraps a prolog clause

Version:
2.0
Author:
Ugo Chirico 2002
Home Page: http://www.ugosweb.com/jiprolog
See Also:
JIPTerm, Serialized Form

Method Summary
static JIPClause create(JIPFunctor head, JIPCons body)
          Creates a new JIPClause object
static JIPClause create(JIPTerm term)
          Creates a new JIPClause object starting from e JIPTerm object
 JIPCons getBody()
          Returns the body of this JIPClause object
 JIPFunctor getHead()
          Returns the predicate in the head of this JIPClause object
 
Methods inherited from class com.ugos.JIProlog.engine.JIPTerm
clear, clone, getVariables, getVariablesTable, toString, toString, toStringq, unifiable, unify
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static final JIPClause create(JIPFunctor head,
                                     JIPCons body)
Creates a new JIPClause object

Parameters:
head - the head of the clause
body - the body of the clause. body can be null if the clause has no body.
Returns:
new JIPClause object
See Also:
JIPFunctor, JIPCons

create

public static final JIPClause create(JIPTerm term)
Creates a new JIPClause object starting from e JIPTerm object

Parameters:
term - the JIPTerm object to trasform in a clause
Returns:
new JIPClause object
Throws:
JIPParameterTypeException - if term cannot be trasformed in a clause
See Also:
JIPTerm

getHead

public final JIPFunctor getHead()
Returns the predicate in the head of this JIPClause object

Returns:
head of this JIPClause object
See Also:
JIPFunctor

getBody

public final JIPCons getBody()
Returns the body of this JIPClause object

Returns:
head of this JIPClause object
See Also:
JIPCons