net.sf.bddbddb
Class Variable

java.lang.Object
  extended by net.sf.bddbddb.Variable
Direct Known Subclasses:
Constant, Universe

public class Variable
extends java.lang.Object

A Variable is a variable in a rule.

Version:
$Id: Variable.java 353 2004-10-27 19:21:05Z joewhaley $
Author:
jwhaley

Field Summary
protected  Domain domain
          Domain of variable.
protected  java.lang.String name
          Name of variable.
 
Constructor Summary
Variable()
          Create empty variable.
Variable(java.lang.String name)
          Create a new variable with the given name.
Variable(java.lang.String name, Domain fd)
          Create a new variable with the given name and domain.
 
Method Summary
static Variable fromXMLElement(org.jdom.Element e, XMLFactory f)
           
 Domain getDomain()
          Get the domain of this variable.
 java.lang.String getName()
           
 void setDomain(Domain domain)
          Set the domain of this variable.
 void setName(java.lang.String name)
          Set the name of this variable.
 java.lang.String toString()
           
 org.jdom.Element toXMLElement(InferenceRule ir)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
Name of variable.


domain

protected Domain domain
Domain of variable.

Constructor Detail

Variable

public Variable()
Create empty variable.


Variable

public Variable(java.lang.String name)
Create a new variable with the given name.

Parameters:
name - name of variable

Variable

public Variable(java.lang.String name,
                Domain fd)
Create a new variable with the given name and domain.

Parameters:
name - name of variable
fd - domain of variable
Method Detail

getName

public java.lang.String getName()
Returns:
Returns the name.

setName

public void setName(java.lang.String name)
Set the name of this variable.

Parameters:
name - The name to set.

getDomain

public Domain getDomain()
Get the domain of this variable.

Returns:
domain of this variable

setDomain

public void setDomain(Domain domain)
Set the domain of this variable.

Parameters:
domain - the domain to set.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

fromXMLElement

public static Variable fromXMLElement(org.jdom.Element e,
                                      XMLFactory f)

toXMLElement

public org.jdom.Element toXMLElement(InferenceRule ir)


Copyright © 2004-2008 Stanford SUIF Compiler Group. All Rights Reserved.