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 void setEndTuple(NTuple<Descriptor> endTuple) {
53 this.endTuple = endTuple;
56 public int hashCode() {
57 return src.hashCode() + dst.hashCode() + initTuple.hashCode() + endTuple.hashCode();
60 public NTuple<Descriptor> getEndTuple() {
64 public boolean equals(Object obj) {
66 if (obj instanceof FlowEdge) {
67 FlowEdge in = (FlowEdge) obj;
68 if (src.equals(in.getSrc()) && dst.equals(in.getDst()) && initTuple.equals(in.getInitTuple())
69 && endTuple.equals(in.getEndTuple())) {