Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightSingle.java @ 5831:bd047b71ab37
Repaired internal references
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 25 Apr 2013 12:06:39 +0200 |
parents | flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/BedHeightSingle.java@0a0ab6909cd8 |
children |
comparison
equal
deleted
inserted
replaced
5830:160f53ee0870 | 5831:bd047b71ab37 |
---|---|
1 package org.dive4elements.river.artifacts.model.minfo; | |
2 | |
3 import gnu.trove.TDoubleArrayList; | |
4 | |
5 | |
6 public class BedHeightSingle | |
7 extends BedHeight | |
8 { | |
9 | |
10 protected int year; | |
11 protected TDoubleArrayList data_gap; | |
12 protected TDoubleArrayList morphWidth; | |
13 | |
14 public BedHeightSingle() { | |
15 super(); | |
16 this.year = -1; | |
17 data_gap = new TDoubleArrayList(); | |
18 morphWidth = new TDoubleArrayList(); | |
19 } | |
20 | |
21 public BedHeightSingle(String name) { | |
22 super(name); | |
23 this.year = -1; | |
24 data_gap = new TDoubleArrayList(); | |
25 morphWidth = new TDoubleArrayList(); | |
26 } | |
27 | |
28 public void add( | |
29 double value, | |
30 double station, | |
31 double gap, | |
32 double width, | |
33 int year | |
34 ) { | |
35 super.add(value, station); | |
36 this.year = year; | |
37 this.data_gap.add(gap); | |
38 this.morphWidth.add(width); | |
39 } | |
40 | |
41 public int getYear() { | |
42 return this.year; | |
43 } | |
44 | |
45 public double getMorphWidth(int idx) { | |
46 return this.morphWidth.get(idx); | |
47 } | |
48 | |
49 public double getDataGap(int idx) { | |
50 return this.data_gap.get(idx); | |
51 } | |
52 | |
53 public double getMorphWidth(double station) { | |
54 if (this.station.indexOf(station) >= 0) { | |
55 return this.morphWidth.get(this.station.indexOf(station)); | |
56 } | |
57 return Double.NaN; | |
58 } | |
59 | |
60 public double getDataGap(double station) { | |
61 if (this.station.indexOf(station) >= 0) { | |
62 return this.getDataGap(this.station.indexOf(station)); | |
63 } | |
64 return Double.NaN; | |
65 } | |
66 | |
67 public double[] getMorphWidths() { | |
68 return this.morphWidth.toNativeArray(); | |
69 } | |
70 } |