1 package Analysis.SSJava;
5 public class FlowEdge {
10 // indicates that which tuple in the graph initiates this edge
11 private NTuple<Descriptor> initTuple;
13 // indicates that which tuple in the graph is the end of this edge
14 private NTuple<Descriptor> endTuple;
16 public FlowEdge(FlowNode src, FlowNode dst, NTuple<Descriptor> initTuple,
17 NTuple<Descriptor> endTuple) {
20 this.initTuple = initTuple;
21 this.endTuple = endTuple;
24 public String toString() {
25 return "Edge(" + initTuple + "/" + endTuple + "):: " + src + " to " + dst;
28 public FlowNode getSrc() {
32 public void setSrc(FlowNode src) {
36 public FlowNode getDst() {
40 public void setDst(FlowNode dst) {
44 public NTuple<Descriptor> getInitTuple() {
48 public void setInitTuple(NTuple<Descriptor> initTuple) {
49 this.initTuple = initTuple;
52 public int hashCode() {
53 return src.hashCode() + dst.hashCode() + initTuple.hashCode() + endTuple.hashCode();
56 public NTuple<Descriptor> getEndTuple() {
60 public boolean equals(Object obj) {
62 if (obj instanceof FlowEdge) {
63 FlowEdge in = (FlowEdge) obj;
64 if (src.equals(in.getSrc()) && dst.equals(in.getDst()) && initTuple.equals(in.getInitTuple())
65 && endTuple.equals(in.getEndTuple())) {