Class AbstractNbtList<T extends NbtElement>

java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<T>
net.minecraft.nbt.AbstractNbtList<T>
All Implemented Interfaces:
Iterable<T>, Collection<T>, List<T>, NbtElement
Direct Known Subclasses:
NbtByteArray, NbtIntArray, NbtList, NbtLongArray

public abstract class AbstractNbtList<T extends NbtElement>
extends AbstractList<T>
implements NbtElement
Represents an abstraction of a mutable NBT list which holds elements of the same type.
  • Constructor Details

    • AbstractNbtList

      public AbstractNbtList()
  • Method Details

    • set

      public abstract T set​(int int2, T t)
      Specified by:
      set in interface List<T extends NbtElement>
      Overrides:
      set in class AbstractList<T extends NbtElement>
    • add

      public abstract void add​(int int2, T t)
      Specified by:
      add in interface List<T extends NbtElement>
      Overrides:
      add in class AbstractList<T extends NbtElement>
    • remove

      public abstract T remove​(int int2)
      Specified by:
      remove in interface List<T extends NbtElement>
      Overrides:
      remove in class AbstractList<T extends NbtElement>
    • setElement

      public abstract boolean setElement​(int index, NbtElement element)
    • addElement

      public abstract boolean addElement​(int index, NbtElement element)
    • getHeldType

      public abstract byte getHeldType()
      Gets the type of element that this list holds.
      Returns:
      the type of element that this list holds