aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/config/ConfigKey.java
diff options
context:
space:
mode:
authorAnton Tananaev <atananaev@lyft.com>2020-12-28 14:26:47 -0800
committerAnton Tananaev <atananaev@lyft.com>2020-12-28 14:26:47 -0800
commitea0e6285be71112c5049d4712a2a31c8348dc9cc (patch)
tree46986824f54d07e84606802d93476387a912cc45 /src/main/java/org/traccar/config/ConfigKey.java
parent3cc85b094e571f7cf655b5b4d678a7ba718d323e (diff)
downloadtrackermap-server-ea0e6285be71112c5049d4712a2a31c8348dc9cc.tar.gz
trackermap-server-ea0e6285be71112c5049d4712a2a31c8348dc9cc.tar.bz2
trackermap-server-ea0e6285be71112c5049d4712a2a31c8348dc9cc.zip
Refactor config keys
Diffstat (limited to 'src/main/java/org/traccar/config/ConfigKey.java')
-rw-r--r--src/main/java/org/traccar/config/ConfigKey.java20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/main/java/org/traccar/config/ConfigKey.java b/src/main/java/org/traccar/config/ConfigKey.java
index b9f54bcca..926b46851 100644
--- a/src/main/java/org/traccar/config/ConfigKey.java
+++ b/src/main/java/org/traccar/config/ConfigKey.java
@@ -15,22 +15,26 @@
*/
package org.traccar.config;
-public class ConfigKey {
+import java.util.List;
+
+public class ConfigKey<T> {
private final String key;
- private final Class<?> clazz;
+ private final List<KeyType> types;
+ private final T defaultValue;
+
+ ConfigKey(String key, List<KeyType> types) {
+ this(key, types, null);
+ }
- ConfigKey(String key, Class<?> clazz) {
+ ConfigKey(String key, List<KeyType> types, T defaultValue) {
this.key = key;
- this.clazz = clazz;
+ this.types = types;
+ this.defaultValue = defaultValue;
}
String getKey() {
return key;
}
- Class<?> getValueClass() {
- return clazz;
- }
-
}