T - the generic type of the primitive objectsItemTagType<T,T>public static class ItemTagType.PrimitiveTagType<T> extends Object implements ItemTagType<T,T>
ItemTagType.PrimitiveTagType<T>BYTE, BYTE_ARRAY, DOUBLE, FLOAT, INTEGER, INTEGER_ARRAY, LONG, LONG_ARRAY, SHORT, STRING, TAG_CONTAINER| Modifier and Type | Method | Description |
|---|---|---|
T |
fromPrimitive(T primitive,
ItemTagAdapterContext context) |
Creates a complex object based of the passed primitive value
|
Class<T> |
getComplexType() |
Returns the complex object type the primitive value resembles.
|
Class<T> |
getPrimitiveType() |
Returns the primitive data type of this tag.
|
T |
toPrimitive(T complex,
ItemTagAdapterContext context) |
Returns the primitive data that resembles the complex object passed to
this method.
|
@NotNull public Class<T> getPrimitiveType()
ItemTagTypegetPrimitiveType in interface ItemTagType<T,T>@NotNull public Class<T> getComplexType()
ItemTagTypegetComplexType in interface ItemTagType<T,T>@NotNull public T toPrimitive(@NotNull T complex, @NotNull ItemTagAdapterContext context)
ItemTagTypetoPrimitive in interface ItemTagType<T,T>complex - the complex object instancecontext - the context this operation is running in@NotNull public T fromPrimitive(@NotNull T primitive, @NotNull ItemTagAdapterContext context)
ItemTagTypefromPrimitive in interface ItemTagType<T,T>primitive - the primitive valuecontext - the context this operation is running inCopyright © 2019. All rights reserved.