Class PersistentJsonDataType<T extends com.google.gson.JsonElement>
java.lang.Object
io.github.bakedlibs.dough.data.persistent.PersistentJsonDataType<T>
- All Implemented Interfaces:
PersistentDataType<String,T>
public final class PersistentJsonDataType<T extends com.google.gson.JsonElement>
extends Object
implements PersistentDataType<String,T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.persistence.PersistentDataType
PersistentDataType.PrimitivePersistentDataType<T extends Object> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PersistentJsonDataType<com.google.gson.JsonArray>static final PersistentJsonDataType<com.google.gson.JsonObject>Fields inherited from interface org.bukkit.persistence.PersistentDataType
BYTE, BYTE_ARRAY, DOUBLE, FLOAT, INTEGER, INTEGER_ARRAY, LONG, LONG_ARRAY, SHORT, STRING, TAG_CONTAINER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfromPrimitive(String primitive, PersistentDataAdapterContext context) toPrimitive(com.google.gson.JsonElement complex, PersistentDataAdapterContext context)
-
Field Details
-
JSON_OBJECT
-
JSON_ARRAY
-
-
Constructor Details
-
PersistentJsonDataType
-
-
Method Details
-
getPrimitiveType
- Specified by:
getPrimitiveTypein interfacePersistentDataType<String,T extends com.google.gson.JsonElement>
-
getComplexType
- Specified by:
getComplexTypein interfacePersistentDataType<String,T extends com.google.gson.JsonElement>
-
toPrimitive
public String toPrimitive(com.google.gson.JsonElement complex, PersistentDataAdapterContext context) - Specified by:
toPrimitivein interfacePersistentDataType<String,T extends com.google.gson.JsonElement>
-
fromPrimitive
- Specified by:
fromPrimitivein interfacePersistentDataType<String,T extends com.google.gson.JsonElement>
-