Module syntaxnbt

Class TagIntArray


public class TagIntArray extends TagArray<Integer,int[]>
A length-prefixed array of signed integers. The prefix is a signed integer (thus 4 bytes) and indicates the number of 4 byte integers.
Author:
SyntaxError404
  • Constructor Details

    • TagIntArray

      public TagIntArray()
      Constructs a new tag with an initial empty array
    • TagIntArray

      public TagIntArray(int[] value)
      Constructs a new tag with an initial value
      Parameters:
      value - initial value
  • Method Details

    • set

      public TagIntArray set(int index, Number value)
      Description copied from class: TagArray
      Replaces an element at the specified position in the array
      Specified by:
      set in class TagArray<Integer,int[]>
      Parameters:
      index - index of the element to replace
      value - the element to be stored at the specified position
      Returns:
      this array
    • get

      public Integer get(int index)
      Description copied from class: TagArray
      Returns the element at the specified position in this array
      Specified by:
      get in class TagArray<Integer,int[]>
      Parameters:
      index - index of the element to be returned
      Returns:
      the element at the specified position in this array
    • getTag

      public TagInt getTag(int index)
      Description copied from class: TagArray
      Returns the tag at the specified position in this array as a TagNumber
      Specified by:
      getTag in class TagArray<Integer,int[]>
      Parameters:
      index - index of the element to be returned
      Returns:
      the element at the specified position in this array
    • compare

      protected boolean compare(Tag<int[]> tag)
      Description copied from class: Tag
      Compares two tags for equality
      Overrides:
      compare in class Tag<int[]>
      Parameters:
      tag - tag to compare to
      Returns:
      whether the tags are equal