diff options
author | Anton Tananaev <atananaev@lyft.com> | 2020-12-28 14:26:47 -0800 |
---|---|---|
committer | Anton Tananaev <atananaev@lyft.com> | 2020-12-28 14:26:47 -0800 |
commit | ea0e6285be71112c5049d4712a2a31c8348dc9cc (patch) | |
tree | 46986824f54d07e84606802d93476387a912cc45 /src/main/java/org/traccar/config/ConfigKey.java | |
parent | 3cc85b094e571f7cf655b5b4d678a7ba718d323e (diff) | |
download | trackermap-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.java | 20 |
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; - } - } |