comparison flys-backend/src/main/java/de/intevation/flys/importer/ImportPosition.java @ 186:cf8cbcb6a10d

Added parser to read *.KM files. flys-backend/trunk@1506 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 17 Mar 2011 17:43:57 +0000
parents a60edcfe5f53
children ecf90018563b
comparison
equal deleted inserted replaced
185:a60edcfe5f53 186:cf8cbcb6a10d
1 package de.intevation.flys.importer; 1 package de.intevation.flys.importer;
2 2
3 public class ImportPosition 3 public class ImportPosition
4 implements Comparable<ImportPosition>
4 { 5 {
5 protected String value; 6 protected String value;
6 7
7 public ImportPosition() { 8 public ImportPosition() {
8 } 9 }
9 10
10 public ImportPosition(String value) { 11 public ImportPosition(String value) {
11 this.value = value; 12 this.value = value;
12 } 13 }
13 14
15 public int compareTo(ImportPosition other) {
16 return value.compareTo(other.value);
17 }
18
14 public String getValue() { 19 public String getValue() {
15 return value; 20 return value;
16 } 21 }
17 22
18 public void setValue(String value) { 23 public void setValue(String value) {
19 this.value = value; 24 this.value = value;
20 } 25 }
21
22 @Override
23 public boolean equals(Object other) {
24 if (other == this) return true;
25 if (!(other instanceof ImportPosition)) return false;
26 return value.equals(((ImportPosition)other).value);
27 }
28
29 @Override
30 public int hashCode() {
31 return value.hashCode();
32 }
33 } 26 }
34 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 27 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
35 28

http://dive4elements.wald.intevation.org