com.ibm.wala.fixpoint
Class BooleanVariable

java.lang.Object
  extended by com.ibm.wala.util.graph.impl.NodeWithNumber
      extended by com.ibm.wala.fixedpoint.impl.AbstractVariable
          extended by com.ibm.wala.fixpoint.BooleanVariable
All Implemented Interfaces:
IVariable, INodeWithNumber

public class BooleanVariable
extends AbstractVariable

A boolean variable for dataflow analysis.


Constructor Summary
BooleanVariable(boolean b, int hash)
           
BooleanVariable(int hash)
          Default constructor
 
Method Summary
 void copyState(IVariable v)
          Set this variable to have the same state as another one.
 boolean equals(java.lang.Object obj)
           
 boolean getValue()
           
 int hashCode()
           
 void or(BooleanVariable other)
           
 boolean sameValue(BooleanVariable other)
           
 void set(boolean b)
           
 java.lang.String toString()
           
 
Methods inherited from class com.ibm.wala.fixedpoint.impl.AbstractVariable
getOrderNumber, setOrderNumber
 
Methods inherited from class com.ibm.wala.util.graph.impl.NodeWithNumber
getGraphNodeId, setGraphNodeId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.wala.util.graph.INodeWithNumber
getGraphNodeId, setGraphNodeId
 

Constructor Detail

BooleanVariable

public BooleanVariable(int hash)
Default constructor


BooleanVariable

public BooleanVariable(boolean b,
                       int hash)
Parameters:
b - initial value for this variable
Method Detail

copyState

public void copyState(IVariable v)
               throws java.lang.NullPointerException
Description copied from interface: IVariable
Set this variable to have the same state as another one.

Throws:
java.lang.NullPointerException

sameValue

public boolean sameValue(BooleanVariable other)

toString

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

getValue

public boolean getValue()
Returns:
the value of this variable

or

public void or(BooleanVariable other)
Parameters:
other -
Throws:
java.lang.IllegalArgumentException - if other is null

hashCode

public int hashCode()
Specified by:
hashCode in class AbstractVariable

set

public void set(boolean b)
Parameters:
b -

equals

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