diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-08-15 11:19:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-15 11:19:11 +0300 |
commit | 70bea1304ded17bb8a94ce8495d1e395e7cdf748 (patch) | |
tree | 7634388ffd859f23d1703481dd65402a361185d6 /src/org/traccar/Config.java | |
parent | 8030d39ca0522bc8be69e017fa9fc06900d1a7bc (diff) | |
parent | 807ce3b00210b96c68727ce675400a5205dcf4a1 (diff) | |
download | trackermap-server-70bea1304ded17bb8a94ce8495d1e395e7cdf748.tar.gz trackermap-server-70bea1304ded17bb8a94ce8495d1e395e7cdf748.tar.bz2 trackermap-server-70bea1304ded17bb8a94ce8495d1e395e7cdf748.zip |
Merge pull request #2215 from Abyss777/speed_threshold
Made speed threshold configurable
Diffstat (limited to 'src/org/traccar/Config.java')
-rw-r--r-- | src/org/traccar/Config.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/org/traccar/Config.java b/src/org/traccar/Config.java index 49d6e4fde..7fd725734 100644 --- a/src/org/traccar/Config.java +++ b/src/org/traccar/Config.java @@ -74,4 +74,16 @@ public class Config { } } + public double getDouble(String key) { + return getDouble(key, 0.0); + } + + public double getDouble(String key, double defaultValue) { + if (properties.containsKey(key)) { + return Double.parseDouble(properties.getProperty(key)); + } else { + return defaultValue; + } + } + } |