Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/importer/ImportRange.java @ 5542:f3b270e5462e
Wst Parser: Another attempt to fix the order of the Q ranges.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Wed, 03 Apr 2013 20:16:01 +0200 |
parents | 2c99995395f5 |
children |
comparison
equal
deleted
inserted
replaced
5541:b09c095a0b7e | 5542:f3b270e5462e |
---|---|
38 return +1; | 38 return +1; |
39 } | 39 } |
40 return a.compareTo(b); | 40 return a.compareTo(b); |
41 } | 41 } |
42 | 42 |
43 public void fixRangesOrder() { | |
44 if (compare(a, b) > 0) { | |
45 BigDecimal t = a; a = b; b = t; | |
46 } | |
47 } | |
48 | |
43 public int compareTo(ImportRange other) { | 49 public int compareTo(ImportRange other) { |
44 int cmp = compare(a, other.a); | 50 int cmp = compare(a, other.a); |
45 if (cmp != 0) return cmp; | 51 if (cmp != 0) return cmp; |
46 return compare(b, other.b); | 52 return compare(b, other.b); |
47 } | 53 } |