comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/BedHeightSingle.java @ 3897:bce2dd4310a6

MINFO: Updated data fields to fit the needs of bedheight difference calculation. flys-artifacts/trunk@5560 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 21 Sep 2012 14:18:16 +0000
parents 633fbb61a0cc
children 0a0ab6909cd8
comparison
equal deleted inserted replaced
3896:82109cea32d2 3897:bce2dd4310a6
1 package de.intevation.flys.artifacts.model.minfo; 1 package de.intevation.flys.artifacts.model.minfo;
2
3 import gnu.trove.TDoubleArrayList;
2 4
3 5
4 public class BedHeightSingle 6 public class BedHeightSingle
5 extends BedHeight 7 extends BedHeight
6 { 8 {
7 9
8 protected int year; 10 protected int year;
11 protected TDoubleArrayList data_gap;
12 protected TDoubleArrayList morphWidth;
9 13
10 public BedHeightSingle() { 14 public BedHeightSingle() {
11 super(); 15 super();
12 this.year = -1; 16 this.year = -1;
17 data_gap = new TDoubleArrayList();
18 morphWidth = new TDoubleArrayList();
13 } 19 }
14 20
15 public BedHeightSingle(String name) { 21 public BedHeightSingle(String name) {
16 super(name); 22 super(name);
17 this.year = -1; 23 this.year = -1;
24 data_gap = new TDoubleArrayList();
25 morphWidth = new TDoubleArrayList();
18 } 26 }
19 27
20 public void add( 28 public void add(
21 double value, 29 double value,
22 double station, 30 double station,
23 double gap, 31 double gap,
24 double width, 32 double width,
25 int year 33 int year
26 ) { 34 ) {
27 super.add(value, station, gap, width); 35 super.add(value, station);
28 this.year = year; 36 this.year = year;
37 this.data_gap.add(gap);
38 this.morphWidth.add(width);
29 } 39 }
30 40
31 public int getYear() { 41 public int getYear() {
32 return this.year; 42 return this.year;
33 } 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 }
34 } 66 }

http://dive4elements.wald.intevation.org