ix.icore
Class Variable

java.lang.Object
  extended by ix.icore.Variable
All Implemented Interfaces:
java.lang.Comparable

public class Variable
extends java.lang.Object
implements java.lang.Comparable


Field Summary
protected  java.lang.Object name
           
protected  int number
           
protected  PNode sourceNode
           
 
Constructor Summary
Variable(java.lang.Object name)
           
 
Method Summary
 int compareTo(java.lang.Object o)
           
 java.lang.String displayString()
           
static java.util.List getAllVariables()
           
 java.lang.Object getName()
           
 PNode getSourceNode()
           
 java.lang.Object getValue()
           
 boolean isBound()
           
static boolean isFullyBound(java.lang.Object tree)
           
static boolean isFullyBoundEverywhere(java.lang.Object obj)
           
 boolean isGlobal()
           
static java.lang.Object removeAllVars(java.lang.Object obj)
          Returns a copy of the object in which every Variable is replaced by its value, if it has a value, or else by the ItemVar that is its name.
static java.lang.Object removeVars(java.lang.Object tree)
          Returns a copy of the tree in which every Variable is replaced by its value, if it has a value, or else by the ItemVar that is its name.
static java.lang.Object revertAllVars(java.lang.Object obj)
          Returns a copy of the object in which every Variable is replaced by the ItemVar that is its name.
static java.lang.Object revertVars(java.lang.Object tree)
          Returns a copy of the tree in which every Variable is replaced by the ItemVar that is its name.
 void setName(java.lang.Object name)
           
 void setSourceNode(PNode n)
           
 void setValue(java.lang.Object v)
           
 java.lang.String toString()
           
static java.util.Set unboundVarsAnywhereIn(java.lang.Object obj)
           
static java.util.Set unboundVarsIn(java.util.Collection c)
           
static java.util.Set varsAnywhereIn(java.lang.Object obj)
           
static java.util.Set varsIn(LList tree)
           
static java.util.Set varsIn(java.lang.Object tree)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected java.lang.Object name

number

protected int number

sourceNode

protected PNode sourceNode
Constructor Detail

Variable

public Variable(java.lang.Object name)
Method Detail

getName

public java.lang.Object getName()

setName

public void setName(java.lang.Object name)

getValue

public java.lang.Object getValue()

setValue

public void setValue(java.lang.Object v)

getSourceNode

public PNode getSourceNode()

setSourceNode

public void setSourceNode(PNode n)

isBound

public boolean isBound()

isGlobal

public boolean isGlobal()

getAllVariables

public static java.util.List getAllVariables()

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

displayString

public java.lang.String displayString()

toString

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

varsIn

public static java.util.Set varsIn(java.lang.Object tree)

varsIn

public static java.util.Set varsIn(LList tree)

varsAnywhereIn

public static java.util.Set varsAnywhereIn(java.lang.Object obj)

unboundVarsAnywhereIn

public static java.util.Set unboundVarsAnywhereIn(java.lang.Object obj)

unboundVarsIn

public static java.util.Set unboundVarsIn(java.util.Collection c)

isFullyBoundEverywhere

public static boolean isFullyBoundEverywhere(java.lang.Object obj)

isFullyBound

public static boolean isFullyBound(java.lang.Object tree)

revertVars

public static java.lang.Object revertVars(java.lang.Object tree)
Returns a copy of the tree in which every Variable is replaced by the ItemVar that is its name.


revertAllVars

public static java.lang.Object revertAllVars(java.lang.Object obj)
Returns a copy of the object in which every Variable is replaced by the ItemVar that is its name.


removeVars

public static java.lang.Object removeVars(java.lang.Object tree)
Returns a copy of the tree in which every Variable is replaced by its value, if it has a value, or else by the ItemVar that is its name.


removeAllVars

public static java.lang.Object removeAllVars(java.lang.Object obj)
Returns a copy of the object in which every Variable is replaced by its value, if it has a value, or else by the ItemVar that is its name.