Class StringArrayDataType

  • All Implemented Interfaces:
    org.bukkit.persistence.PersistentDataType<byte[],​java.lang.String[]>

    public class StringArrayDataType
    extends java.lang.Object
    implements org.bukkit.persistence.PersistentDataType<byte[],​java.lang.String[]>
    A PersistentDataType for String arrays
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.bukkit.persistence.PersistentDataType

        org.bukkit.persistence.PersistentDataType.PrimitivePersistentDataType<T extends java.lang.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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      @NotNull java.lang.String @NotNull [] fromPrimitive​(byte @NotNull [] bytes, @NotNull org.bukkit.persistence.PersistentDataAdapterContext itemTagAdapterContext)  
      @NotNull java.lang.Class<java.lang.String[]> getComplexType()  
      @NotNull java.lang.Class<byte[]> getPrimitiveType()  
      byte @NotNull [] toPrimitive​(java.lang.String[] strings, @NotNull org.bukkit.persistence.PersistentDataAdapterContext context)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StringArrayDataType

        public StringArrayDataType​(java.nio.charset.Charset charset)
        Creates a new StringArrayDataType with the given charset
        Parameters:
        charset - The charset to use
    • Method Detail

      • getPrimitiveType

        @NotNull
        public @NotNull java.lang.Class<byte[]> getPrimitiveType()
        Specified by:
        getPrimitiveType in interface org.bukkit.persistence.PersistentDataType<byte[],​java.lang.String[]>
      • getComplexType

        @NotNull
        public @NotNull java.lang.Class<java.lang.String[]> getComplexType()
        Specified by:
        getComplexType in interface org.bukkit.persistence.PersistentDataType<byte[],​java.lang.String[]>
      • toPrimitive

        public byte @NotNull [] toPrimitive​(java.lang.String[] strings,
                                            @NotNull
                                            @NotNull org.bukkit.persistence.PersistentDataAdapterContext context)
        Specified by:
        toPrimitive in interface org.bukkit.persistence.PersistentDataType<byte[],​java.lang.String[]>
      • fromPrimitive

        @NotNull
        public @NotNull java.lang.String @NotNull [] fromPrimitive​(byte @NotNull [] bytes,
                                                                   @NotNull
                                                                   @NotNull org.bukkit.persistence.PersistentDataAdapterContext itemTagAdapterContext)
        Specified by:
        fromPrimitive in interface org.bukkit.persistence.PersistentDataType<byte[],​java.lang.String[]>