1 7 package org.hammurapi.inspectors.metrics.callertrace; 8 9 15 public class EdgeImpl { 16 private Object nodeA; 17 private Object nodeB; 18 19 public EdgeImpl ( Object nodeA, Object nodeB ){ 20 super(); 21 this.setNodeA( nodeA ); 22 this.setNodeB( nodeB ); 23 } 24 25 public String toString(){ 26 27 return nodeA.toString() + AdjacencyMatrix.KEY_SEPERATOR + nodeB.toString(); 28 } 29 30 public Object toKey(){ 31 32 return this.toString(); 33 } 34 35 public boolean equals ( EdgeImpl e){ 37 if ( e.toKey() != null && this.toKey().equals(e.toKey() )){ 38 return true; 39 } else { return false; } 40 } 41 42 45 public Object getNodeA() { 46 return nodeA; 47 } 48 49 52 public void setNodeA(Object nodeA) { 53 this.nodeA = nodeA; 54 } 55 56 59 public Object getNodeB() { 60 return nodeB; 61 } 62 63 66 public void setNodeB(Object nodeB) { 67 this.nodeB = nodeB; 68 } 69 70 } 71 | Popular Tags |