/Users/lyon/j4p/src/graphics/graph/Edge.java

1    package graphics.graph; 
2     
3    class Edge { 
4        private int from; 
5        private int to; 
6        private double len; 
7     
8        public int getFrom() { 
9            return from; 
10       } 
11    
12       public boolean equals(Edge e) { 
13           if (e.from == from) return true; 
14           if (e.to == to) return true; 
15           //if (e.from == to) return true; 
16           //if (e == this) return true; 
17           return false; 
18       } 
19    
20       public void setFrom(int _from) { 
21           from = _from; 
22       } 
23    
24       public int getTo() { 
25           return to; 
26       } 
27    
28       public void setTo(int _to) { 
29           to = _to; 
30       } 
31    
32       public double getLen() { 
33           return len; 
34       } 
35    
36       public void setLen(double _len) { 
37           len = _len; 
38       } 
39   }