orc.ast.simple.argument
Class FreeVariable

java.lang.Object
  extended by orc.ast.simple.argument.Argument
      extended by orc.ast.simple.argument.FreeVariable
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<FreeVariable>, Locatable, Located

public class FreeVariable
extends Argument
implements java.lang.Comparable<FreeVariable>

Free variables. All such variables embed a String key. Equivalence on these variables is equality of the embedded string. Like normal Variables, these occur in argument position. The subst method on simplified expressions can only substitute for a free variable.

Author:
dkitchin
See Also:
Serialized Form

Field Summary
 java.lang.String name
           
 
Constructor Summary
FreeVariable(java.lang.String key)
           
 
Method Summary
 int compareTo(FreeVariable f)
           
 Argument convert(Env<Variable> vars)
          Convert to DeBruijn index.
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class orc.ast.simple.argument.Argument
addFree, convertAll, getSourceLocation, setSourceLocation, subst, substAll
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

name

public java.lang.String name
Constructor Detail

FreeVariable

public FreeVariable(java.lang.String key)
Method Detail

compareTo

public int compareTo(FreeVariable f)
Specified by:
compareTo in interface java.lang.Comparable<FreeVariable>

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

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

convert

public Argument convert(Env<Variable> vars)
                 throws UnboundVariableException
Description copied from class: Argument
Convert to DeBruijn index.

Specified by:
convert in class Argument
Throws:
UnboundVariableException