Class CompoundTag

java.lang.Object
com.sk89q.jnbt.Tag<Object,org.enginehub.linbus.tree.LinCompoundTag>
com.sk89q.jnbt.CompoundTag
All Implemented Interfaces:
org.enginehub.linbus.tree.ToLinTag<org.enginehub.linbus.tree.LinCompoundTag>

@Deprecated public final class CompoundTag extends Tag<Object,org.enginehub.linbus.tree.LinCompoundTag>
Deprecated.
Use LinCompoundTag.
The TAG_Compound tag.
  • Field Summary

    Fields inherited from class com.sk89q.jnbt.Tag

    linTag
  • Constructor Summary

    Constructors
    Constructor
    Description
    CompoundTag(Map<String,Tag<?,?>> value)
    Deprecated.
    Creates the tag with an empty name.
    CompoundTag(org.enginehub.linbus.tree.LinCompoundTag tag)
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Deprecated.
    Get a double named with the given key, even if it's another type of number.
    int
    Deprecated.
    Get an int named with the given key, even if it's another type of number.
    long
    Deprecated.
    Get a long named with the given key, even if it's another type of number.
    boolean
    Deprecated.
    Returns whether this compound tag contains the given key.
    Deprecated.
    Create a compound tag builder.
    byte
    Deprecated.
    Get a byte named with the given key.
    byte[]
    Deprecated.
    Get a byte array named with the given key.
    double
    Deprecated.
    Get a double named with the given key.
    float
    Deprecated.
    Get a float named with the given key.
    int
    Deprecated.
    Get an int named with the given key.
    int[]
    Deprecated.
    Get a int[] named with the given key.
    List<? extends Tag<?,?>>
    Deprecated.
    Get a list of tags named with the given key.
    <T extends Tag<?, ?>>
    List<T>
    getList(String key, Class<T> listType)
    Deprecated.
    Get a list of tags named with the given key.
    <EV, E extends org.enginehub.linbus.tree.LinTag<EV>>
    ListTag<EV,E>
    Deprecated.
    Get a TagList named with the given key.
    long
    Deprecated.
    Get a long named with the given key.
    long[]
    Deprecated.
    Get a long[] named with the given key.
    short
    Deprecated.
    Get a short named with the given key.
    Deprecated.
    Get a string named with the given key.
    Map<String,Tag<?,?>>
    Deprecated.
    Gets the value of this tag.
    setValue(Map<String,Tag<?,?>> value)
    Deprecated.
    Return a new compound tag with the given values.

    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

    • CompoundTag

      public CompoundTag(Map<String,Tag<?,?>> value)
      Deprecated.
      Creates the tag with an empty name.
      Parameters:
      value - the value of the tag
    • CompoundTag

      public CompoundTag(org.enginehub.linbus.tree.LinCompoundTag tag)
      Deprecated.
  • Method Details

    • containsKey

      public boolean containsKey(String key)
      Deprecated.
      Returns whether this compound tag contains the given key.
      Parameters:
      key - the given key
      Returns:
      true if the tag contains the given key
    • getValue

      public Map<String,Tag<?,?>> getValue()
      Deprecated.
      Description copied from class: Tag
      Gets the value of this tag.
      Overrides:
      getValue in class Tag<Object,org.enginehub.linbus.tree.LinCompoundTag>
      Returns:
      the value
    • setValue

      public CompoundTag setValue(Map<String,Tag<?,?>> value)
      Deprecated.
      Return a new compound tag with the given values.
      Parameters:
      value - the value
      Returns:
      the new compound tag
    • createBuilder

      public CompoundTagBuilder createBuilder()
      Deprecated.
      Create a compound tag builder.
      Returns:
      the builder
    • getByteArray

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

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

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

      public byte getByte(String key)
      Deprecated.
      Get a byte named with the given key.

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

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

      public double getDouble(String key)
      Deprecated.
      Get a double named with the given key.

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

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

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

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

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

      public float getFloat(String key)
      Deprecated.
      Get a float named with the given key.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public <EV, E extends org.enginehub.linbus.tree.LinTag<EV>> ListTag<EV,E> getListTag(String key)
      Deprecated.
      Get a TagList named with the given key.

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

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

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

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

      Type Parameters:
      T - the type of list
      Parameters:
      key - the key
      listType - the class of the contained type
      Returns:
      a list of tags
    • getLongArray

      public long[] getLongArray(String key)
      Deprecated.
      Get a long[] named with the given key.

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

      Parameters:
      key - the key
      Returns:
      an int array
    • getLong

      public long getLong(String key)
      Deprecated.
      Get a long named with the given key.

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

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

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

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

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

      public short getShort(String key)
      Deprecated.
      Get a short named with the given key.

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

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

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

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

      Parameters:
      key - the key
      Returns:
      a string