Module syntaxnbt

Class TagLongArray


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

    • TagLongArray

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

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

    • set

      public TagLongArray 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<Long,long[]>
      Parameters:
      index - index of the element to replace
      value - the element to be stored at the specified position
      Returns:
      this array
    • get

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

      public TagLong 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<Long,long[]>
      Parameters:
      index - index of the element to be returned
      Returns:
      the element at the specified position in this array
    • compare

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