inpro.irmrsc.rmrs
Class VariableIDPair

java.lang.Object
  extended by inpro.irmrsc.rmrs.VariableIDPair
All Implemented Interfaces:
VariableIDsInterpretable

public class VariableIDPair
extends java.lang.Object
implements VariableIDsInterpretable

A pair of two variable IDs. Used to represent relations between variable IDs like e.g. scope constraints and variable equations in Formulas.

Author:
Andreas Peldszus

Field Summary
private  int mLeft
           
private  int mRight
           
 
Constructor Summary
VariableIDPair(int left, int right)
           
VariableIDPair(VariableIDPair p)
           
 
Method Summary
 int getLeft()
           
 int getRight()
           
 java.util.Set<java.lang.Integer> getVariableIDs()
           
 void replaceVariableID(int oldID, int newID)
          replace all variables IDs matching a specifid old ID with a new ID
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mLeft

private int mLeft

mRight

private int mRight
Constructor Detail

VariableIDPair

public VariableIDPair(int left,
                      int right)

VariableIDPair

public VariableIDPair(VariableIDPair p)
Method Detail

getLeft

public int getLeft()

getRight

public int getRight()

getVariableIDs

public java.util.Set<java.lang.Integer> getVariableIDs()
Specified by:
getVariableIDs in interface VariableIDsInterpretable
Returns:
the set of IDs of all variables in that expression

replaceVariableID

public void replaceVariableID(int oldID,
                              int newID)
Description copied from interface: VariableIDsInterpretable
replace all variables IDs matching a specifid old ID with a new ID

Specified by:
replaceVariableID in interface VariableIDsInterpretable

toString

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