diff artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadData.java @ 8856:5e38e2924c07 3.2.x

Fix code style.
author Tom Gottfried <tom@intevation.de>
date Thu, 18 Jan 2018 20:12:01 +0100
parents ef0ec2498dd0
children 0a5239a1e46e
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadData.java	Thu Jan 18 20:10:59 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadData.java	Thu Jan 18 20:12:01 2018 +0100
@@ -65,7 +65,8 @@
     };
 
     public static final int measurementStationType(int grainFraction) {
-        return grainFraction < 0 || grainFraction >= MEASUREMENT_STATION_GF.length
+        return grainFraction < 0
+            || grainFraction >= MEASUREMENT_STATION_GF.length
             ? Station.UNKNOWN
             : MEASUREMENT_STATION_GF[grainFraction];
     }
@@ -248,8 +249,10 @@
             }
         }
 
-        public void allLoadsWithValue(Collection<Load> loads, Integer sqRelationTimeInterval) {
-
+        public void allLoadsWithValue(
+            Collection<Load> loads,
+            Integer sqRelationTimeInterval
+        ) {
             for (List<Value> values: grainFractions) {
                 if (values == null) {
                     continue;
@@ -261,7 +264,9 @@
                     Load load = value.getLoad();
                     Integer sqId = load.getSQRelationTimeIntervalId();
                     if ((sqRelationTimeInterval == null)
-                        || sqId != null && sqId.equals(sqRelationTimeInterval)) {
+                        || sqId != null
+                        && sqId.equals(sqRelationTimeInterval)
+                    ) {
                         loads.add(load);
                     }
                 }
@@ -292,11 +297,13 @@
             this.type |= other.type;
             for (int i = 0, N = grainFractions.size(); i < N; ++i) {
                 grainFractions.set(i,
-                    mergeValues(grainFractions.get(i), other.grainFractions.get(i)));
+                    mergeValues(
+                        grainFractions.get(i), other.grainFractions.get(i)));
             }
         }
 
-        private static final Comparator<Value> ID_CMP = new Comparator<Value>() {
+        private static final Comparator<Value> ID_CMP =
+            new Comparator<Value>() {
             @Override
             public int compare(Value a, Value b) {
                 return a.getLoad().getId() - b.getLoad().getId();
@@ -354,7 +361,10 @@
             }
         }
 
-        public List<Value> filterGrainFraction(int grainFraction, Value.Filter filter) {
+        public List<Value> filterGrainFraction(
+            int grainFraction,
+            Value.Filter filter
+        ) {
             final List<Value> result = new ArrayList<Value>();
             filterGrainFraction(grainFraction, filter, new Value.Visitor() {
                 @Override
@@ -492,7 +502,8 @@
         }
     };
 
-    public static final Comparator<Load> LOAD_SQ_TI_CMP = new Comparator<Load>() {
+    public static final Comparator<Load> LOAD_SQ_TI_CMP =
+        new Comparator<Load>() {
         @Override
         public int compare(Load a, Load b) {
             Integer a_id = a.getSQRelationTimeIntervalId();
@@ -511,7 +522,11 @@
     };
 
     /** Find all loads in the range a/b with the according sq_time_interval */
-    public Collection<Load> findLoadsWithValue(double a, double b, final Integer sqRelationTimeInterval) {
+    public Collection<Load> findLoadsWithValue(
+        double a,
+        double b,
+        final Integer sqRelationTimeInterval
+    ) {
         final TreeSet<Load> loads = new TreeSet<Load>(LOAD_ID_CMP);
 
         findStations(a, b, new Visitor() {
@@ -528,7 +543,10 @@
      *
      * This is mainly a convenience function for the SedimentLoadInfoService.
      */
-    public Collection<Load> findDistinctSQTimeIntervalNonEpochLoadsWithValue(double a, double b) {
+    public Collection<Load> findDistinctSQTimeIntervalNonEpochLoadsWithValue(
+        double a,
+        double b
+    ) {
         final TreeSet<Load> loads = new TreeSet<Load>(LOAD_SQ_TI_CMP);
 
         findStations(a, b, new Visitor() {

http://dive4elements.wald.intevation.org