diff -r ce8e85452c3b -r 2bd032a701a7 icfp-solver/src/main/java/ru/bosony/graph/CellsLink.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/icfp-solver/src/main/java/ru/bosony/graph/CellsLink.java Mon Jul 16 13:10:14 2012 +0400 @@ -0,0 +1,59 @@ +package ru.bosony.graph; + +import ru.bosony.model.mine.Cell; +import ru.bosony.model.mine.Mine; + +/** + * @author indvdum (gotoindvdum[at]gmail[dot]com)
+ * 16.07.2012 11:09:35 + * + */ +public class CellsLink { + Mine mine; + Cell source; + Cell target; + double weight = 1d; + + public CellsLink(Mine mine, Cell source, Cell target) { + this.mine = mine; + this.source = source; + this.target = target; + calculateWeight(); + } + + protected void calculateWeight() { + + } + + public Mine getMine() { + return mine; + } + + public Cell getSource() { + return source; + } + + public Cell getTarget() { + return target; + } + + public double getWeight() { + return weight; + } + + @Override + public int hashCode() { + // TODO Auto-generated method stub + return super.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (obj instanceof CellsLink) { + CellsLink otherLink = (CellsLink) obj; + return source.equals(otherLink.source) && target.equals(otherLink.target); + } + return super.equals(obj); + } + +}