From 1262a26ffd8be27609eccc23d4c652c2b0083b46 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 17 Jul 2015 19:35:30 +1200 Subject: Remove enum json conversion --- src/org/traccar/web/EnumFactory.java | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 src/org/traccar/web/EnumFactory.java (limited to 'src/org/traccar/web/EnumFactory.java') diff --git a/src/org/traccar/web/EnumFactory.java b/src/org/traccar/web/EnumFactory.java deleted file mode 100644 index efbfd4b20..000000000 --- a/src/org/traccar/web/EnumFactory.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.traccar.web; - -import org.traccar.model.Factory; - -import javax.json.JsonObject; - -public class EnumFactory & Factory> { - private Class commandTypeClass; - private String jsonKey; - - public EnumFactory(Class commandTypeClass, String type) { - this.commandTypeClass = commandTypeClass; - jsonKey = type; - } - - public K create(JsonObject json) { - Factory factory = Enum.valueOf(commandTypeClass, json.getString(jsonKey)); - return (K) factory.create(); - } -} -- cgit v1.2.3