com.intellectualcrafters.jnbt

## Class CompoundTagBuilder

- java.lang.Object
- - com.intellectualcrafters.jnbt.CompoundTagBuilder

-     public class CompoundTagBuilder
      extends java.lang.Object

  Helps create compound tags.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `CompoundTag` | `build()` Build an unnamed compound tag with this builder's entries.
    `CompoundTag` | `build(java.lang.String name)` Build a new compound tag with this builder's entries.
    `static CompoundTagBuilder` | `create()` Create a new builder instance.
    `CompoundTagBuilder` | `put(java.lang.String key, Tag value)` Put the given key and tag into the compound tag.
    `CompoundTagBuilder` | `putAll(java.util.Map<java.lang.String,? extends Tag> value)` Put all the entries from the given map into this map.
    `CompoundTagBuilder` | `putByte(java.lang.String key, byte value)` Put the given key and value into the compound tag as a `ByteTag`.
    `CompoundTagBuilder` | `putByteArray(java.lang.String key, byte[] value)` Put the given key and value into the compound tag as a `ByteArrayTag`.
    `CompoundTagBuilder` | `putDouble(java.lang.String key, double value)` Put the given key and value into the compound tag as a `DoubleTag`.
    `CompoundTagBuilder` | `putFloat(java.lang.String key, float value)` Put the given key and value into the compound tag as a `FloatTag`.
    `CompoundTagBuilder` | `putInt(java.lang.String key, int value)` Put the given key and value into the compound tag as an `IntTag`.
    `CompoundTagBuilder` | `putIntArray(java.lang.String key, int[] value)` Put the given key and value into the compound tag as a `IntArrayTag`.
    `CompoundTagBuilder` | `putLong(java.lang.String key, long value)` Put the given key and value into the compound tag as a `LongTag`.
    `CompoundTagBuilder` | `putShort(java.lang.String key, short value)` Put the given key and value into the compound tag as a `ShortTag`.
    `CompoundTagBuilder` | `putString(java.lang.String key, java.lang.String value)` Put the given key and value into the compound tag as a `StringTag`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### create

          public static CompoundTagBuilder create()

      Create a new builder instance.
      Returns:
        a new builder

    - #### put

          public CompoundTagBuilder put(java.lang.String key,
                               Tag value)

      Put the given key and tag into the compound tag.
      Parameters:
        `key` - they key
        `value` - the value
      Returns:
        this object

    - #### putByteArray

          public CompoundTagBuilder putByteArray(java.lang.String key,
                                        byte[] value)

      Put the given key and value into the compound tag as a `ByteArrayTag`.
      Parameters:
        `key` - they key
        `value` - the value
      Returns:
        this object

    - #### putByte

          public CompoundTagBuilder putByte(java.lang.String key,
                                   byte value)

      Put the given key and value into the compound tag as a `ByteTag`.
      Parameters:
        `key` - they key
        `value` - the value
      Returns:
        this object

    - #### putDouble

          public CompoundTagBuilder putDouble(java.lang.String key,
                                     double value)

      Put the given key and value into the compound tag as a `DoubleTag`.
      Parameters:
        `key` - they key
        `value` - the value
      Returns:
        this object

    - #### putFloat

          public CompoundTagBuilder putFloat(java.lang.String key,
                                    float value)

      Put the given key and value into the compound tag as a `FloatTag`.
      Parameters:
        `key` - they key
        `value` - the value
      Returns:
        this object

    - #### putIntArray

          public CompoundTagBuilder putIntArray(java.lang.String key,
                                       int[] value)

      Put the given key and value into the compound tag as a `IntArrayTag`.
      Parameters:
        `key` - they key
        `value` - the value
      Returns:
        this object

    - #### putInt

          public CompoundTagBuilder putInt(java.lang.String key,
                                  int value)

      Put the given key and value into the compound tag as an `IntTag`.
      Parameters:
        `key` - they key
        `value` - the value
      Returns:
        this object

    - #### putLong

          public CompoundTagBuilder putLong(java.lang.String key,
                                   long value)

      Put the given key and value into the compound tag as a `LongTag`.
      Parameters:
        `key` - they key
        `value` - the value
      Returns:
        this object

    - #### putShort

          public CompoundTagBuilder putShort(java.lang.String key,
                                    short value)

      Put the given key and value into the compound tag as a `ShortTag`.
      Parameters:
        `key` - they key
        `value` - the value
      Returns:
        this object

    - #### putString

          public CompoundTagBuilder putString(java.lang.String key,
                                     java.lang.String value)

      Put the given key and value into the compound tag as a `StringTag`.
      Parameters:
        `key` - they key
        `value` - the value
      Returns:
        this object

    - #### putAll

          public CompoundTagBuilder putAll(java.util.Map<java.lang.String,? extends Tag> value)

      Put all the entries from the given map into this map.
      Parameters:
        `value` - the map of tags
      Returns:
        this object

    - #### build

          public CompoundTag build()

      Build an unnamed compound tag with this builder's entries.
      Returns:
        the new compound tag

    - #### build

          public CompoundTag build(java.lang.String name)

      Build a new compound tag with this builder's entries.
      Parameters:
        `name` - the name of the tag
      Returns:
        the created compound tag