aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/helper/Parser.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-19 12:22:04 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-19 12:22:04 +1300
commit66f6f48f00f01600afb13395c8b8c1fe95254201 (patch)
tree3228c552d5bf52b77251929d95ad66b5fb6601be /src/org/traccar/helper/Parser.java
parent43814126839b863ac73452d395a0ec5e0d817d46 (diff)
downloadtrackermap-server-66f6f48f00f01600afb13395c8b8c1fe95254201.tar.gz
trackermap-server-66f6f48f00f01600afb13395c8b8c1fe95254201.tar.bz2
trackermap-server-66f6f48f00f01600afb13395c8b8c1fe95254201.zip
Fix more check style issues
Diffstat (limited to 'src/org/traccar/helper/Parser.java')
-rw-r--r--src/org/traccar/helper/Parser.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/org/traccar/helper/Parser.java b/src/org/traccar/helper/Parser.java
index ef972600b..7c15c0323 100644
--- a/src/org/traccar/helper/Parser.java
+++ b/src/org/traccar/helper/Parser.java
@@ -38,10 +38,14 @@ public class Parser {
}
public boolean hasNext() {
+ return hasNext(1);
+ }
+
+ public boolean hasNext(int number) {
if (matcher.group(position) != null) {
return true;
} else {
- position++;
+ position += number;
return false;
}
}
@@ -80,6 +84,7 @@ public class Parser {
public enum CoordinateFormat {
DEG_MIN_HEM,
+ DEG_MIN_MIN_HEM,
HEM_DEG,
HEM_DEG_MIN,
HEM_DEG_MIN_HEM
@@ -90,6 +95,11 @@ public class Parser {
String hemisphere;
switch (format) {
+ case DEG_MIN_MIN_HEM:
+ coordinate = nextInt();
+ coordinate += (nextInt() + nextInt() / 1000.0) / 60;
+ hemisphere = next();
+ break;
case HEM_DEG:
hemisphere = next();
coordinate = nextDouble();