Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Segment.java @ 5110:ab2f1e0be311 dami
Merge branch default into dami
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Wed, 27 Feb 2013 11:38:36 +0100 |
parents | a929d9a9fa1e |
children | 842026a5a12c |
comparison
equal
deleted
inserted
replaced
5109:357938c64967 | 5110:ab2f1e0be311 |
---|---|
51 | 51 |
52 public boolean isUp() { | 52 public boolean isUp() { |
53 return from < to; | 53 return from < to; |
54 } | 54 } |
55 | 55 |
56 /** Checks whether given km lies inside the to/from bounds of this segment. */ | |
56 public boolean inside(double km) { | 57 public boolean inside(double km) { |
57 return from < to | 58 return from < to |
58 ? km >= from && km <= to | 59 ? km >= from && km <= to |
59 : km >= to && km <= from; | 60 : km >= to && km <= from; |
60 } | 61 } |
118 | 119 |
119 public double getReferencePoint() { | 120 public double getReferencePoint() { |
120 return referencePoint; | 121 return referencePoint; |
121 } | 122 } |
122 | 123 |
124 /** Use DoubleUtil to parse Segments. */ | |
123 public static List<Segment> parseSegments(String input) { | 125 public static List<Segment> parseSegments(String input) { |
124 | 126 |
125 final List<Segment> segments = new ArrayList<Segment>(); | 127 final List<Segment> segments = new ArrayList<Segment>(); |
126 | 128 |
127 DoubleUtil.parseSegments(input, new DoubleUtil.SegmentCallback() { | 129 DoubleUtil.parseSegments(input, new DoubleUtil.SegmentCallback() { |