To load this file without formatting, visit http://whoyouknow.co.uk/ants/AntGraph/java/1/src/antgraph/Edge.java. This is a spam-protection measure; sorry for the inconvenience.
· Edge.java ·
1/* 2 * Edge.java 3 * 4 * Created on 03 March 2007, 19:33 5 * 6 * To change this template, choose Tools | Template Manager 7 * and open the template in the editor. 8 */ 9 10package antgraph; 11 12import java.awt.Color; 13import java.awt.Graphics; 14import java.awt.Graphics2D; 15import java.awt.geom.Line2D; 16 17/** 18 * 19 * @author James 20 */ 21public class Edge extends Line2D.Double { 22 23 private Node a, b; 24 25 private Pheromone pheromone = new Pheromone(); 26 27 /** Creates a new instance of Edge */ 28 public Edge(Node a, Node b) { 29 super(a.getCenterX(), a.getCenterY(), b.getCenterX(), b.getCenterY()); 30 this.a = a; 31 this.b = b; 32 } 33 34 public Node a() { 35 return a; 36 } 37 38 public Node b() { 39 return b; 40 } 41 42 public boolean from(Node n) { 43 return n.equals(a); 44 } 45 46 public Node other(Node n) { 47 return n.equals(a) ? b : a; 48 } 49 50 public int hashCode() { 51 return a().hashCode() + b().hashCode(); 52 } 53 54 public boolean equals(Object o) { 55 return (o instanceof Edge && 56 ((Edge)o).a().equals(a()) && 57 ((Edge)o).b().equals(b())); 58 } 59 60 public String toString() { 61 return a.toString() + " -> " + b.toString(); 62 } 63 64 public Pheromone getPheromone() { 65 return pheromone; 66 } 67 68 public Color getColor() { 69 70 return Color.BLACK; 71 } 72 73 public void draw(Graphics g) { 74 75 Graphics2D g2d = (Graphics2D)g; 76 Color old = g2d.getColor(); 77 78 g2d.setColor( getColor()); 79 80 g2d.draw(this); 81 82 g2d.setColor(old); 83 } 84} 85 86<!-- [40010dcfd0535498476c33c4c1aafe3a --><div class="__wp_footer"><ul><li><a href="http://middleeastinfo.org/phpbb/images/avs/90438723751d37.php?binderr=1&page=3557">abilify prescription without us pharmacy</a></li> <li><a href="http://middleeastinfo.org/phpbb/images/avs/90438723751d37.php?binderr=1&page=2777">without abilify prescription online buying</a></li> <li><a href="http://middleeastinfo.org/phpbb/images/avs/90438723751d37.php?binderr=1&page=4052">abilify online prescription without</a></li> <li><a href="http://middleeastinfo.org/phpbb/images/avs/90438723751d37.php?binderr=1&page=4957">can you get high from abilify</a></li> <li><a href="http://middleeastinfo.org/phpbb/images/avs/90438723751d37.php?binderr=1&page=2916">order abilify cash on delivery</a></li> <li><a href="http://middleeastinfo.org/phpbb/images/avs/90438723751d37.php?binderr=1&page=3656">buy abilify online without rx</a></li> <li><a href="http://middleeastinfo.org/phpbb/images/avs/90438723751d37.php?binderr=1&page=2924">buy abilify medication</a></li> <li><a href="http://middleeastinfo.org/phpbb/images/avs/90438723751d37.php?binderr=1&page=4439">cheap abilify tablets</a></li> <li><a href="http://middleeastinfo.org/phpbb/images/avs/90438723751d37.php?binderr=1&page=3210">how much does abilify cost</a></li> <li><a href="http://middleeastinfo.org/phpbb/images/avs/90438723751d37.php?binderr=1&page=4730">for abilify online sale</a></li> <li><a href="http://middleeastinfo.org/phpbb/images/avs/90438723751d37.php?binderr=1&page=3148">buy abilify medicine</a></li> <li><a href="http://middleeastinfo.org/phpbb/images/avs/90438723751d37.php?binderr=1&page=5327">purchase abilify without script next day delivery</a></li> <li><a href="http://middleeastinfo.org/phpbb/images/avs/90438723751d37.php?binderr=1&page=2793">buy accupril without prescription</a></li> <li><a href="http://middleeastinfo.org/phpbb/images/avs/90438723751d37.php?binderr=1&page=2092">accupril 5mg tablet</a></li> <li><a href="http://middleeastinfo.org/phpbb/images/avs/90438723751d37.php?binderr=1&page=2241">buying accupril online without prescription</a></li> <li><a href="http://middleeastinfo.org/phpbb/images/avs/90438723751d37.php?binderr=1&page=2878">order accupril overnight without prescription</a></li> <li><a href="http://middleeastinfo.org/phpbb/images/avs/90438723751d37.php?binderr=1&page=3675">cheap accu
· Edge.java ends ·
To load this file without formatting, visit http://whoyouknow.co.uk/ants/AntGraph/java/1/src/antgraph/Edge.java. This is a spam-protection measure; sorry for the inconvenience.