Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadYearSelect.java @ 8532:73a4c3c202e5
(issue1051) Use a list of single years in SedimentLoadYear mode
Instead of a range you can now select multiple distinct years
in the sedimentload calculation.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Wed, 11 Feb 2015 18:00:48 +0100 |
parents | e4606eae8ea5 |
children | 9fa5c66073e7 |
comparison
equal
deleted
inserted
replaced
8531:3e6d4bd1c06e | 8532:73a4c3c202e5 |
---|---|
45 throws IllegalArgumentException | 45 throws IllegalArgumentException |
46 { | 46 { |
47 SedimentLoadAccess access = new SedimentLoadAccess((D4EArtifact) artifact); | 47 SedimentLoadAccess access = new SedimentLoadAccess((D4EArtifact) artifact); |
48 | 48 |
49 // Second year should be later than first. | 49 // Second year should be later than first. |
50 if (access.getPeriod() != null && access.getPeriod()[1] < access.getPeriod()[0]) | 50 if (access.getYears() != null && access.getYears()[1] < access.getYears()[0]) |
51 throw new IllegalArgumentException("error_years_wrong"); | 51 throw new IllegalArgumentException("error_years_wrong"); |
52 | 52 |
53 return true; | 53 return true; |
54 } | 54 } |
55 } | 55 } |