1 |
package dk.daoas.fulddaekning; |
package dk.daoas.fulddaekning; |
2 |
|
|
3 |
|
import geocode.GeoPoint; |
4 |
|
|
5 |
public class Adresse extends GeoPoint { |
public class Adresse extends GeoPoint { |
6 |
public int id; |
public int id; |
7 |
public short postnr; |
public short postnr; |
12 |
public String rute; |
public String rute; |
13 |
public short ho; |
public short ho; |
14 |
|
|
15 |
|
public Adresse(Double latitude, Double longitude) { |
16 |
|
super(latitude, longitude); |
17 |
|
} |
18 |
|
|
19 |
|
|
20 |
@Override |
@Override |
21 |
public String toString() { |
public String toString() { |
22 |
return "Adresse id=" + id+ " postnr=" + postnr + " adresse=" + adresse + " ho=" + ho; |
return "Adresse id=" + id+ " postnr=" + postnr + " adresse=" + adresse + " ho=" + ho; |
23 |
} |
} |
24 |
|
|
25 |
|
@Override //Fra KDNodeComparator |
26 |
|
protected boolean isNodeCompatible(GeoPoint other) { |
27 |
|
if (! (other instanceof Adresse) ) { |
28 |
|
System.out.print("How the hell did this happen?"); |
29 |
|
System.exit(1); |
30 |
|
return false; |
31 |
|
} |
32 |
|
Adresse addr = (Adresse) other; |
33 |
|
|
34 |
|
return (this.ho == addr.ho); |
35 |
|
} |
36 |
|
|
37 |
} |
} |