changeset 4515:17d896822d70

Added methods to sediment load object to check fractions.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 14 Nov 2012 17:02:51 +0100
parents 457b5444c7d7
children de4832ffde2a
files flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/SedimentLoad.java
diffstat 1 files changed, 45 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/SedimentLoad.java	Wed Nov 14 16:59:58 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/SedimentLoad.java	Wed Nov 14 17:02:51 2012 +0100
@@ -160,5 +160,50 @@
             kms.put(km, f);
         }
     }
+
+    public boolean hasCoarse() {
+        for (SedimentLoadFraction slf : kms.values()) {
+            if (slf.getCoarse() > 0d) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public boolean hasFineMiddle() {
+        for (SedimentLoadFraction slf : kms.values()) {
+            if (slf.getFine_middle() > 0d) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public boolean hasSand() {
+        for (SedimentLoadFraction slf : kms.values()) {
+            if (slf.getSand() > 0d) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public boolean hasSuspSand() {
+        for (SedimentLoadFraction slf : kms.values()) {
+            if (slf.getSusp_sand() > 0d) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public boolean hasSuspSediment() {
+        for (SedimentLoadFraction slf : kms.values()) {
+            if (slf.getSusp_sediment() > 0d) {
+                return true;
+            }
+        }
+        return false;
+    }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org