daikon
Class DynamicConstants.Constant

Object
  extended by DynamicConstants.Constant
All Implemented Interfaces:
Serializable
Enclosing class:
DynamicConstants

public static class DynamicConstants.Constant
extends Object
implements Serializable

Class used to indicate, for each variable, whether it is constant (see boolean field "constant"). If it is, then the class also stores its constant value and its sample count.

Note that two objects of this class are equal if they refer to the same variable. This allows these to be stored in sets.

See Also:
Serialized Form

Field Summary
 int count
          The sample count of the constant.
 Object val
          The value of the constant, or the previous constant value if constant==false && previous_constant==true.
 VarInfo vi
          The variable that has this value.
 
Constructor Summary
DynamicConstants.Constant(VarInfo vi)
           
 
Method Summary
 void checkRep()
          Check representation invariant.
 boolean equals(Object obj)
           
 int hashCode()
           
 boolean is_prev_constant()
          returns whether the specified variable is currently a constant OR was a constant at the beginning of constants processing.
 String toString()
           
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

val

public Object val
The value of the constant, or the previous constant value if constant==false && previous_constant==true. Null iff count=0.


count

public int count
The sample count of the constant.


vi

public VarInfo vi
The variable that has this value.

Constructor Detail

DynamicConstants.Constant

public DynamicConstants.Constant(VarInfo vi)
Method Detail

checkRep

public void checkRep()
Check representation invariant.


is_prev_constant

public boolean is_prev_constant()
returns whether the specified variable is currently a constant OR was a constant at the beginning of constants processing.


equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object