Migrate GraphNode functionality into its own class and we inherit from this class...
[IRC.git] / Robust / src / Util / Edge.java
1 package Util;
2
3 /* Edge *****************/
4
5 public class Edge {
6     protected GraphNode target;
7     protected GraphNode source;
8     protected String dotnodeparams = new String();
9     
10     public Edge(GraphNode target) {
11         this.target = target;
12     }
13     
14     public String getLabel() {
15         return "";
16     }
17     
18     public void setSource(GraphNode s) {
19         this.source=s;
20     }
21     
22     public GraphNode getSource() {
23         return source;
24     }
25     
26     public GraphNode getTarget() {
27         return target;
28     }
29     
30     public void setDotNodeParameters(String param) {
31         if (param == null) {
32             throw new NullPointerException();
33         }
34         if (param.length() > 0) {
35             dotnodeparams = "," + param;
36         } else {
37             dotnodeparams = new String();
38         }
39     }
40 }