com.ugos.JIProlog.engine
Class JIPVariable

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

public class JIPVariable
extends JIPTerm

JIPVariable wraps a prolog variable

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

Method Summary
static JIPVariable create()
          Creates a new anonimous Variable
static JIPVariable create(java.lang.String strName)
          Creates a new Variable
 java.lang.String getName()
          Returns the name of the variable
 JIPTerm getValue()
          If the variable is bounded it returns the JIPTerm object bounded, otherwise it raises a JIPRuntimeException.
 boolean isAnonymous()
          Checks if the variable is anonymous
 boolean isBounded()
          Checks if the variable is bounded (instantiated)
 
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 JIPVariable create(java.lang.String strName)
Creates a new Variable

Parameters:
strName - the name of the variable

create

public static final JIPVariable create()
Creates a new anonimous Variable


getValue

public final JIPTerm getValue()
If the variable is bounded it returns the JIPTerm object bounded, otherwise it raises a JIPRuntimeException.

See Also:
JIPTerm

getName

public final java.lang.String getName()
Returns the name of the variable


isBounded

public final boolean isBounded()
Checks if the variable is bounded (instantiated)


isAnonymous

public final boolean isAnonymous()
Checks if the variable is anonymous