Class ArrayDataType<T>
java.lang.Object
com.jeff_media.morepersistentdatatypes.datatypes.collections.ArrayDataType<T>
- Type Parameters:
T
- The type of the array
- All Implemented Interfaces:
PersistentDataType<PersistentDataContainer,
T[]>
public class ArrayDataType<T>
extends Object
implements PersistentDataType<PersistentDataContainer,T[]>
A
PersistentDataType
for 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
ConstructorDescriptionArrayDataType
(T[] array, PersistentDataType<?, T> dataType) Creates a new ArrayDataType -
Method Summary
Modifier and TypeMethodDescriptionT[]
fromPrimitive
(PersistentDataContainer pdc, PersistentDataAdapterContext persistentDataAdapterContext) toPrimitive
(T[] array, PersistentDataAdapterContext context)
-
Constructor Details
-
ArrayDataType
Creates a new ArrayDataType- Parameters:
array
- The array to get the class fromdataType
- ThePersistentDataType
of the array's elements
-
-
Method Details
-
getPrimitiveType
- Specified by:
getPrimitiveType
in interfacePersistentDataType<PersistentDataContainer,
T[]>
-
getComplexType
- Specified by:
getComplexType
in interfacePersistentDataType<PersistentDataContainer,
T[]>
-
toPrimitive
@NotNull public PersistentDataContainer toPrimitive(T[] array, @NotNull PersistentDataAdapterContext context) - Specified by:
toPrimitive
in interfacePersistentDataType<PersistentDataContainer,
T[]>
-
fromPrimitive
@NotNull public T[] fromPrimitive(@NotNull PersistentDataContainer pdc, @NotNull PersistentDataAdapterContext persistentDataAdapterContext) - Specified by:
fromPrimitive
in interfacePersistentDataType<PersistentDataContainer,
T[]>
-