Mercurial > dive4elements > river
view flys-backend/src/main/java/de/intevation/flys/importer/ImportRange.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 | 003ac16812dd |
line wrap: on
line source
package de.intevation.flys.importer; public class ImportRange implements Comparable<ImportRange> { public Double from; public Double to; public ImportRange() { } public ImportRange(Double from, Double to) { this.from = from; this.to = to; } private static final int compare(Double a, Double b) { if (a == null && b == null) { return 0; } if (a == null && b != null) { return -1; } if (a != null && b == null) { return +1; } return a.compareTo(b); } public int compareTo(ImportRange other) { int cmp = compare(from, other.from); if (cmp != 0) return cmp; return compare(to, other.to); } public Double getFrom() { return from; } public void setFrom(Double from) { this.from = from; } public Double getTo() { return to; } public void setTo(Double to) { this.to = to; } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :