Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/artifacts/model/FastCrossSectionChunk.java @ 6270:44ee7d26eb18
issue1267: Polishing: Move the sorting into the db/sql-query.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 11 Jun 2013 12:19:01 +0200 |
parents | 484a19628b1e |
children | 5f4893db41e4 |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/FastCrossSectionChunk.java Tue Jun 11 12:05:01 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/FastCrossSectionChunk.java Tue Jun 11 12:19:01 2013 +0200 @@ -56,9 +56,6 @@ /** Finds the FastCrossSectionLine at km (null if not found). */ public FastCrossSectionLine getCrossSectionLine(double km) { FastCrossSectionLine key = new FastCrossSectionLine(km); - // TODO follwing is braindead. Create the list in sorted fashion - // instead and remove sorting here. - Collections.sort(crossSectionLines, FastCrossSectionLine.KM_CMP); int pos = Collections.binarySearch( crossSectionLines, key, FastCrossSectionLine.KM_CMP); return pos < 0 ? null : crossSectionLines.get(pos);