Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WKmsImpl.java @ 1190:f514894ec2fd
merged flys-artifacts/2.5
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:14:17 +0200 |
parents | 588798ef4791 |
children | 03fbf1b30e72 |
comparison
equal
deleted
inserted
replaced
917:b48c36076e17 | 1190:f514894ec2fd |
---|---|
1 package de.intevation.flys.artifacts.model; | |
2 | |
3 import gnu.trove.TDoubleArrayList; | |
4 | |
5 public class WKmsImpl | |
6 extends NamedObjectImpl | |
7 implements WKms | |
8 { | |
9 protected TDoubleArrayList kms; | |
10 protected TDoubleArrayList ws; | |
11 | |
12 public WKmsImpl() { | |
13 super(""); | |
14 kms = new TDoubleArrayList(); | |
15 ws = new TDoubleArrayList(); | |
16 } | |
17 | |
18 | |
19 public WKmsImpl(int capacity) { | |
20 super(""); | |
21 kms = new TDoubleArrayList(capacity); | |
22 ws = new TDoubleArrayList(capacity); | |
23 } | |
24 | |
25 | |
26 public WKmsImpl(TDoubleArrayList kms, TDoubleArrayList ws) { | |
27 this(kms, ws, ""); | |
28 } | |
29 | |
30 | |
31 public WKmsImpl( | |
32 TDoubleArrayList kms, | |
33 TDoubleArrayList ws, | |
34 String name | |
35 ) { | |
36 super(name); | |
37 this.kms = kms; | |
38 this.ws = ws; | |
39 } | |
40 | |
41 | |
42 public void add(double km, double w) { | |
43 kms.add(km); | |
44 ws .add(w); | |
45 } | |
46 | |
47 | |
48 public double getW(int index) { | |
49 return ws.getQuick(index); | |
50 } | |
51 | |
52 | |
53 public double getKm(int index) { | |
54 return kms.getQuick(index); | |
55 } | |
56 | |
57 | |
58 public int size() { | |
59 return kms.size(); | |
60 } | |
61 } | |
62 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |