Package 

Class NbtList

  • All Implemented Interfaces:
    java.util.RandomAccess , kotlin.collections.Collection , kotlin.collections.Iterable , kotlin.collections.List , kotlin.collections.MutableCollection , kotlin.collections.MutableIterable , kotlin.collections.MutableList

    
    public final class NbtList<T extends NbtTag>
    extends NbtTag implements List<T>, RandomAccess
                        

    A tag which contains a MutableList structure of NbtTags. All children must have the same class.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public class NbtList.Companion

      Contains useful methods to create NbtLists from Java.

      Kotlin's users may call list(1,2,3).toNbtList() or similar methods.

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      String getStringValue() Returns a string representation of the tag's value.
      Integer getSize()
      Boolean add(T element)
      Unit add(Integer index, T element)
      T set(Integer index, T element)
      List<T> subList(Integer fromIndex, Integer toIndex)
      NbtList<T> deepCopy() Returns a new NbtList with all nested values copied deeply.
      Boolean equals(Object other)
      Integer hashCode()
      • Methods inherited from class br.com.gamemods.nbtmanipulator.NbtList

        addAll, addAll, clear, listIterator, listIterator, remove, removeAll, removeAt, replaceAll, retainAll, sort, toString
      • Methods inherited from class kotlin.collections.MutableList

        contains, containsAll, get, indexOf, isEmpty, iterator, lastIndexOf, removeIf, spliterator
      • Methods inherited from class kotlin.collections.Collection

        forEach
      • Methods inherited from class kotlin.collections.List

        parallelStream, stream, toArray
      • Methods inherited from class java.lang.Object

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

      • NbtList

        NbtList()
        Creates an empty list.
      • NbtList

        NbtList(T tags)
        Uses all tags as initial value of this list.
      • NbtList

        NbtList(Iterable<T> tags)
        Uses all tags as initial value of this list.
      • NbtList

        NbtList(Sequence<T> tags)
        Uses all tags as initial value of this list.
      • NbtList

        NbtList(NbtList<T> tags)
        Uses all tags as initial value of this list.
      • NbtList

        NbtList(String value)
        Parses the string using the same structure which is returned by stringValue.
        Parameters:
        value - A string with a structure like [NbtInt(0), NbtInt(-32), NbtInt(48), NbtInt(127)]