comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataResult.java @ 8132:58e3fed51e9e

GetFractionByName now returns a list as it can differ in Epochs One result can be calculated with multiple epochs. there is a todo in there to correctly split up the epochs in the facets.
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 25 Aug 2014 20:00:45 +0200
parents fae48b3c09d1
children ce35bdf3d750
comparison
equal deleted inserted replaced
8131:fae48b3c09d1 8132:58e3fed51e9e
71 71
72 public List<Fraction> getFractions() { 72 public List<Fraction> getFractions() {
73 return fractions; 73 return fractions;
74 } 74 }
75 75
76 public Fraction getFractionByName(String name) { 76 public List<Fraction> getFractionsByName(String name) {
77 List<Fraction> result = new ArrayList<Fraction>();
77 for (Fraction fraction: fractions) { 78 for (Fraction fraction: fractions) {
78 if (fraction.getName().equals(name)) { 79 if (fraction.getName().equals(name)) {
79 return fraction; 80 result.add(fraction);
80 } 81 }
81 } 82 }
82 return null; 83 return result.isEmpty() ? null : result;
83 } 84 }
84 } 85 }
85 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : 86 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org