diff options
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; - } - } |