diff options
Diffstat (limited to 'src/org/traccar/web/client/model/EnumKeyProvider.java')
-rw-r--r-- | src/org/traccar/web/client/model/EnumKeyProvider.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/org/traccar/web/client/model/EnumKeyProvider.java b/src/org/traccar/web/client/model/EnumKeyProvider.java new file mode 100644 index 00000000..c41d420e --- /dev/null +++ b/src/org/traccar/web/client/model/EnumKeyProvider.java @@ -0,0 +1,13 @@ +package org.traccar.web.client.model; + +import com.sencha.gxt.data.shared.ModelKeyProvider; + + +public class EnumKeyProvider<T extends Enum<T>> implements ModelKeyProvider<T> { + + @Override + public String getKey(T item) { + return String.valueOf(item.ordinal()); + } + +} |