diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WQTimerange.java @ 5379:61bf64b102bc mapgenfix

Merge with default branch
author Christian Lins <christian.lins@intevation.de>
date Fri, 22 Mar 2013 11:25:54 +0100
parents 61f4d4164a30
children
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WQTimerange.java	Wed Mar 06 14:14:15 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WQTimerange.java	Fri Mar 22 11:25:54 2013 +0100
@@ -6,10 +6,12 @@
 
 
 /**
+ * A collection of triples W,Q,Timerange.
  * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
  */
 public class WQTimerange extends WQ {
 
+    /** Used to sort &lt;w,q,timerange&gt; triples. */
     public static class TimerangeItem implements Comparable<TimerangeItem> {
         public double q;
         public double w;
@@ -21,6 +23,7 @@
             this.w = w;
         }
 
+        /** Sets [w,q] in wq. */
         public double[] get(double[] wq) {
             if (wq.length >= 2) {
                 wq[0] = w;
@@ -50,7 +53,7 @@
         }
     }
 
-    protected List<Timerange> ts;
+    protected List<Timerange> timeranges;
 
 
     public WQTimerange() {
@@ -60,28 +63,28 @@
 
     public WQTimerange(String name) {
         super(name);
-        ts = new ArrayList<Timerange>();
+        timeranges = new ArrayList<Timerange>();
     }
 
 
     public void add(double w, double q, Timerange t) {
         ws.add(w);
         qs.add(q);
-        ts.add(t);
+        timeranges.add(t);
     }
 
 
     public Timerange getTimerange(int idx) {
-        return ts.get(idx);
+        return timeranges.get(idx);
     }
 
 
     public Timerange[] getTimeranges() {
-        return ts.toArray(new Timerange[ts.size()]);
+        return timeranges.toArray(new Timerange[timeranges.size()]);
     }
 
     public List<TimerangeItem> sort() {
-        ArrayList<TimerangeItem> items = new ArrayList<TimerangeItem>(ts.size());
+        ArrayList<TimerangeItem> items = new ArrayList<TimerangeItem>(timeranges.size());
         for (int i = 0, n = size(); i < n; i++) {
             items.add(new TimerangeItem(getTimerange(i), getQ(i), getW(i)));
         }

http://dive4elements.wald.intevation.org