comparison flys-backend/src/main/java/de/intevation/flys/importer/parsers/W80Parser.java @ 4803:94cb955234ab

W80Parser: Renamed lastPointIdx() to getLastPointIdx().
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 16 Jan 2013 11:19:41 +0100
parents 7dd5baca4f53
children e9566109bd5b
comparison
equal deleted inserted replaced
4802:7dd5baca4f53 4803:94cb955234ab
139 139
140 /** 140 /**
141 * Get the Index of the last cross-section lines point. 141 * Get the Index of the last cross-section lines point.
142 * @return last points index, -1 if not available. 142 * @return last points index, -1 if not available.
143 */ 143 */
144 private int lastPointIdx() { 144 private int getLastPointIdx() {
145 if (currentLine == null || currentLine.isEmpty()) { 145 if (currentLine == null || currentLine.isEmpty()) {
146 return -1; 146 return -1;
147 } 147 }
148 XY lastPoint = this.currentLine.get(currentLine.size()-1); 148 XY lastPoint = this.currentLine.get(currentLine.size()-1);
149 return lastPoint.getIndex(); 149 return lastPoint.getIndex();
165 // TODO: Scale to have "x==0" e.g. at axis of river. 165 // TODO: Scale to have "x==0" e.g. at axis of river.
166 // TODO: Handle "not straight lines." 166 // TODO: Handle "not straight lines."
167 167
168 // We ignore idx, and increment instead. 168 // We ignore idx, and increment instead.
169 int index; 169 int index;
170 int lastPointIdx = lastPointIdx(); 170 int lastPointIdx = getLastPointIdx();
171 if (lastPointIdx <= 0) { 171 if (lastPointIdx <= 0) {
172 index = 1; 172 index = 1;
173 } else { 173 } else {
174 index = lastPointIdx + 1; 174 index = lastPointIdx + 1;
175 } 175 }

http://dive4elements.wald.intevation.org