Class ConfigurationSerializableArrayDataType<T extends ConfigurationSerializable>
java.lang.Object
com.jeff_media.morepersistentdatatypes.datatypes.serializable.ConfigurationSerializableArrayDataType<T>
- Type Parameters:
T
- The type of theConfigurationSerializable
- All Implemented Interfaces:
PersistentDataType<byte[],
T[]>
public class ConfigurationSerializableArrayDataType<T extends ConfigurationSerializable>
extends Object
implements PersistentDataType<byte[],T[]>
A
PersistentDataType
for ConfigurationSerializable
arrays-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.persistence.PersistentDataType
PersistentDataType.PrimitivePersistentDataType<T extends Object>
-
Field Summary
Fields inherited from interface org.bukkit.persistence.PersistentDataType
BYTE, BYTE_ARRAY, DOUBLE, FLOAT, INTEGER, INTEGER_ARRAY, LONG, LONG_ARRAY, SHORT, STRING, TAG_CONTAINER, TAG_CONTAINER_ARRAY
-
Constructor Summary
ConstructorDescriptionConfigurationSerializableArrayDataType
(Class<T[]> types) Creates a newConfigurationSerializableArrayDataType
with the given type -
Method Summary
Modifier and TypeMethodDescriptionT[]
fromPrimitive
(byte[] bytes, PersistentDataAdapterContext persistentDataAdapterContext) Class<byte[]>
byte[]
toPrimitive
(T[] serializable, PersistentDataAdapterContext persistentDataAdapterContext)
-
Constructor Details
-
ConfigurationSerializableArrayDataType
Creates a newConfigurationSerializableArrayDataType
with the given type- Parameters:
types
- The type of theConfigurationSerializable
-
-
Method Details
-
getPrimitiveType
- Specified by:
getPrimitiveType
in interfacePersistentDataType<byte[],
T extends ConfigurationSerializable[]>
-
getComplexType
- Specified by:
getComplexType
in interfacePersistentDataType<byte[],
T extends ConfigurationSerializable[]>
-
toPrimitive
@NotNull public byte[] toPrimitive(@NotNull T[] serializable, @NotNull PersistentDataAdapterContext persistentDataAdapterContext) - Specified by:
toPrimitive
in interfacePersistentDataType<byte[],
T extends ConfigurationSerializable[]>
-
fromPrimitive
@NotNull public T[] fromPrimitive(@NotNull byte[] bytes, @NotNull PersistentDataAdapterContext persistentDataAdapterContext) - Specified by:
fromPrimitive
in interfacePersistentDataType<byte[],
T extends ConfigurationSerializable[]>
-