ix.icore
Class Variable

java.lang.Object
  |
  +--ix.icore.Variable
All Implemented Interfaces:
java.lang.Comparable

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


Field Summary
(package private) static java.util.List allVariables
           
(package private) static int count
           
(package private)  java.lang.Object name
           
 int number
           
 PNode sourceNode
           
(package private)  java.lang.Object value
           
 
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()
           
 java.lang.Object getValue()
           
static boolean isFullyBound(java.lang.Object tree)
           
 boolean isGlobal()
           
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 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 setValue(java.lang.Object v)
           
 java.lang.String toString()
           
static java.util.Set unboundVarsIn(java.util.Collection c)
           
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

java.lang.Object name

value

java.lang.Object value

allVariables

static java.util.List allVariables

count

static int count

number

public int number

sourceNode

public PNode sourceNode
Constructor Detail

Variable

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

getName

public java.lang.Object getName()

getValue

public java.lang.Object getValue()

setValue

public void setValue(java.lang.Object v)

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)

unboundVarsIn

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

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.

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.