Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/utils/KMIndex.java @ 8613:39ce099a6551
(issue1755) Add good defaults for bedquality distance selection
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Tue, 24 Mar 2015 18:17:23 +0100 |
parents | 9cd3ff139601 |
children | ddcd52d239cd |
comparison
equal
deleted
inserted
replaced
8612:b5854a9b101c | 8613:39ce099a6551 |
---|---|
78 | 78 |
79 public void sort() { | 79 public void sort() { |
80 Collections.sort(entries); | 80 Collections.sort(entries); |
81 } | 81 } |
82 | 82 |
83 public int size() { | |
84 return entries.size(); | |
85 } | |
86 | |
87 public Entry<A> get(int idx) { | |
88 return entries.get(idx); | |
89 } | |
90 | |
83 /** Return the first entry at km. */ | 91 /** Return the first entry at km. */ |
84 public Entry<A> search(double km) { | 92 public Entry<A> search(double km) { |
85 for (Entry<A> entry: entries) { | 93 for (Entry<A> entry: entries) { |
86 if (entry.epsilonEquals(km)) { | 94 if (entry.epsilonEquals(km)) { |
87 return entry; | 95 return entry; |