Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Segment.java @ 3449:fc351f12b906
FixA: Vollmer. Calculated the Q -> Ws. TODO: Produce result.
flys-artifacts/trunk@5112 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 23 Jul 2012 15:24:14 +0000 |
parents | bfbd478bd607 |
children | 1df6984628c3 |
comparison
equal
deleted
inserted
replaced
3448:700d09ca5dc8 | 3449:fc351f12b906 |
---|---|
51 this.values = values; | 51 this.values = values; |
52 } | 52 } |
53 | 53 |
54 public boolean isUp() { | 54 public boolean isUp() { |
55 return from < to; | 55 return from < to; |
56 } | |
57 | |
58 public boolean inside(double km) { | |
59 return from < to | |
60 ? km >= from && km <= to | |
61 : km >= to && km <= from; | |
56 } | 62 } |
57 | 63 |
58 @Override | 64 @Override |
59 public String toString() { | 65 public String toString() { |
60 StringBuilder sb = new StringBuilder("Segment: ["); | 66 StringBuilder sb = new StringBuilder("Segment: ["); |
78 backup = values != null | 84 backup = values != null |
79 ? (double [])values.clone() | 85 ? (double [])values.clone() |
80 : null; | 86 : null; |
81 } | 87 } |
82 | 88 |
89 public double [] getBackup() { | |
90 return backup; | |
91 } | |
92 | |
83 public double getFrom() { | 93 public double getFrom() { |
84 return from; | 94 return from; |
85 } | 95 } |
86 | 96 |
87 public void setTo(double to) { | 97 public void setTo(double to) { |
96 this.values = values; | 106 this.values = values; |
97 } | 107 } |
98 | 108 |
99 public double [] getValues() { | 109 public double [] getValues() { |
100 return values; | 110 return values; |
111 } | |
112 | |
113 public int numValues() { | |
114 return values.length; | |
101 } | 115 } |
102 | 116 |
103 public void setReferencePoint(double referencePoint) { | 117 public void setReferencePoint(double referencePoint) { |
104 this.referencePoint = referencePoint; | 118 this.referencePoint = referencePoint; |
105 } | 119 } |