1 19 20 25 26 27 28 29 30 31 package soot.toolkits.scalar; 32 33 import soot.*; 34 import soot.util.*; 35 import java.util.*; 36 37 38 39 42 public class UnitValueBoxPair 43 { 44 public Unit unit; 45 public ValueBox valueBox; 46 47 48 53 public UnitValueBoxPair(Unit unit, ValueBox valueBox) 54 { 55 this.unit = unit; 56 this.valueBox = valueBox; 57 } 58 59 60 66 public boolean equals(Object other) 67 { 68 if(other instanceof UnitValueBoxPair) 69 { 70 UnitValueBoxPair otherPair = (UnitValueBoxPair) other; 71 72 if(unit.equals(otherPair.unit) && valueBox.equals(otherPair.valueBox)) 73 return true; 74 } 75 76 return false; 77 } 78 79 public int hashCode() { 80 return unit.hashCode() + valueBox.hashCode(); 81 } 82 83 public String toString() { 84 return valueBox+" in "+unit; 85 } 86 87 public Unit getUnit() 88 { 89 return unit; 90 } 91 92 public ValueBox getValueBox() 93 { 94 return valueBox; 95 } 96 97 } 98 | Popular Tags |