Class ListTag<EV,E extends org.enginehub.linbus.tree.LinTag<EV>>

java.lang.Object
com.sk89q.jnbt.Tag<Object,org.enginehub.linbus.tree.LinListTag<E>>
com.sk89q.jnbt.ListTag<EV,E>
All Implemented Interfaces:
org.enginehub.linbus.tree.ToLinTag<org.enginehub.linbus.tree.LinListTag<E>>

@Deprecated public final class ListTag<EV,E extends org.enginehub.linbus.tree.LinTag<EV>> extends Tag<Object,org.enginehub.linbus.tree.LinListTag<E>>
Deprecated.
Use LinListTag.
The TAG_List tag.
  • Field Summary

    Fields inherited from class com.sk89q.jnbt.Tag

    linTag
  • Constructor Summary

    Constructors
    Constructor
    Description
    ListTag(Class<? extends Tag<EV,E>> type, List<? extends Tag<EV,E>> value)
    Deprecated.
    Creates the tag with an empty name.
    ListTag(org.enginehub.linbus.tree.LinListTag<E> tag)
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    asDouble(int index)
    Deprecated.
    Get a double named with the given index, even if it's another type of number.
    int
    asInt(int index)
    Deprecated.
    Get an int named with the given index, even if it's another type of number.
    long
    asLong(int index)
    Deprecated.
    Get a long named with the given index, even if it's another type of number.
    byte
    getByte(int index)
    Deprecated.
    Get a byte named with the given index.
    byte[]
    getByteArray(int index)
    Deprecated.
    Get a byte array named with the given index.
    double
    getDouble(int index)
    Deprecated.
    Get a double named with the given index.
    float
    getFloat(int index)
    Deprecated.
    Get a float named with the given index.
    getIfExists(int index)
    Deprecated.
    Get the tag if it exists at the given index.
    int
    getInt(int index)
    Deprecated.
    Get an int named with the given index.
    int[]
    getIntArray(int index)
    Deprecated.
    Get a int[] named with the given index.
    List<? extends Tag<?,?>>
    getList(int index)
    Deprecated.
    Get a list of tags named with the given index.
    <T extends Tag<?, ?>>
    List<T>
    getList(int index, Class<T> listType)
    Deprecated.
    Get a list of tags named with the given index.
    ListTag<?,?>
    getListTag(int index)
    Deprecated.
    Get a TagList named with the given index.
    long
    getLong(int index)
    Deprecated.
    Get a long named with the given index.
    short
    getShort(int index)
    Deprecated.
    Get a short named with the given index.
    getString(int index)
    Deprecated.
    Get a string named with the given index.
    Class<? extends Tag<EV,E>>
    Deprecated.
    Gets the type of item in this list.
    List<? extends Tag<EV,E>>
    Deprecated.
    Gets the value of this tag.
    setValue(List<? extends Tag<EV,E>> list)
    Deprecated.
    Create a new list tag with this tag's name and type.

    Methods inherited from class com.sk89q.jnbt.Tag

    toLinTag, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ListTag

      public ListTag(Class<? extends Tag<EV,E>> type, List<? extends Tag<EV,E>> value)
      Deprecated.
      Creates the tag with an empty name.
      Parameters:
      type - the type of tag
      value - the value of the tag
    • ListTag

      public ListTag(org.enginehub.linbus.tree.LinListTag<E> tag)
      Deprecated.
  • Method Details

    • getType

      public Class<? extends Tag<EV,E>> getType()
      Deprecated.
      Gets the type of item in this list.
      Returns:
      The type of item in this list.
    • getValue

      public List<? extends Tag<EV,E>> getValue()
      Deprecated.
      Description copied from class: Tag
      Gets the value of this tag.
      Overrides:
      getValue in class Tag<Object,org.enginehub.linbus.tree.LinListTag<E extends org.enginehub.linbus.tree.LinTag<EV>>>
      Returns:
      the value
    • setValue

      public ListTag<EV,E> setValue(List<? extends Tag<EV,E>> list)
      Deprecated.
      Create a new list tag with this tag's name and type.
      Parameters:
      list - the new list
      Returns:
      a new list tag
    • getIfExists

      @Nullable public Tag<EV,E> getIfExists(int index)
      Deprecated.
      Get the tag if it exists at the given index.
      Parameters:
      index - the index
      Returns:
      the tag or null
    • getByteArray

      public byte[] getByteArray(int index)
      Deprecated.
      Get a byte array named with the given index.

      If the index does not exist or its value is not a byte array tag, then an empty byte array will be returned.

      Parameters:
      index - the index
      Returns:
      a byte array
    • getByte

      public byte getByte(int index)
      Deprecated.
      Get a byte named with the given index.

      If the index does not exist or its value is not a byte tag, then 0 will be returned.

      Parameters:
      index - the index
      Returns:
      a byte
    • getDouble

      public double getDouble(int index)
      Deprecated.
      Get a double named with the given index.

      If the index does not exist or its value is not a double tag, then 0 will be returned.

      Parameters:
      index - the index
      Returns:
      a double
    • asDouble

      public double asDouble(int index)
      Deprecated.
      Get a double named with the given index, even if it's another type of number.

      If the index does not exist or its value is not a number, then 0 will be returned.

      Parameters:
      index - the index
      Returns:
      a double
    • getFloat

      public float getFloat(int index)
      Deprecated.
      Get a float named with the given index.

      If the index does not exist or its value is not a float tag, then 0 will be returned.

      Parameters:
      index - the index
      Returns:
      a float
    • getIntArray

      public int[] getIntArray(int index)
      Deprecated.
      Get a int[] named with the given index.

      If the index does not exist or its value is not an int array tag, then an empty array will be returned.

      Parameters:
      index - the index
      Returns:
      an int array
    • getInt

      public int getInt(int index)
      Deprecated.
      Get an int named with the given index.

      If the index does not exist or its value is not an int tag, then 0 will be returned.

      Parameters:
      index - the index
      Returns:
      an int
    • asInt

      public int asInt(int index)
      Deprecated.
      Get an int named with the given index, even if it's another type of number.

      If the index does not exist or its value is not a number, then 0 will be returned.

      Parameters:
      index - the index
      Returns:
      an int
    • getList

      public List<? extends Tag<?,?>> getList(int index)
      Deprecated.
      Get a list of tags named with the given index.

      If the index does not exist or its value is not a list tag, then an empty list will be returned.

      Parameters:
      index - the index
      Returns:
      a list of tags
    • getListTag

      public ListTag<?,?> getListTag(int index)
      Deprecated.
      Get a TagList named with the given index.

      If the index does not exist or its value is not a list tag, then an empty tag list will be returned.

      Parameters:
      index - the index
      Returns:
      a tag list instance
    • getList

      public <T extends Tag<?, ?>> List<T> getList(int index, Class<T> listType)
      Deprecated.
      Get a list of tags named with the given index.

      If the index does not exist or its value is not a list tag, then an empty list will be returned. If the given index references a list but the list of of a different type, then an empty list will also be returned.

      Type Parameters:
      T - the NBT type
      Parameters:
      index - the index
      listType - the class of the contained type
      Returns:
      a list of tags
    • getLong

      public long getLong(int index)
      Deprecated.
      Get a long named with the given index.

      If the index does not exist or its value is not a long tag, then 0 will be returned.

      Parameters:
      index - the index
      Returns:
      a long
    • asLong

      public long asLong(int index)
      Deprecated.
      Get a long named with the given index, even if it's another type of number.

      If the index does not exist or its value is not a number, then 0 will be returned.

      Parameters:
      index - the index
      Returns:
      a long
    • getShort

      public short getShort(int index)
      Deprecated.
      Get a short named with the given index.

      If the index does not exist or its value is not a short tag, then 0 will be returned.

      Parameters:
      index - the index
      Returns:
      a short
    • getString

      public String getString(int index)
      Deprecated.
      Get a string named with the given index.

      If the index does not exist or its value is not a string tag, then "" will be returned.

      Parameters:
      index - the index
      Returns:
      a string