-
- All Implemented Interfaces:
public final class NbtIntArray extends NbtTag
A tag which wraps a mutable int array.
-
-
Field Summary
Fields Modifier and Type Field Description private final String
stringValue
private IntArray
value
-
Constructor Summary
Constructors Constructor Description NbtIntArray()
Creates a new tag with an empty array. NbtIntArray(String value)
Parses the string using the same structure which is returned by stringValue. NbtIntArray(IntArray value)
-
Method Summary
Modifier and Type Method Description String
getStringValue()
Returns a string representation of the tag's value. final IntArray
getValue()
final Unit
setValue(IntArray value)
Boolean
equals(Object other)
Properly checks the equality of the array. Integer
hashCode()
Properly calculates the hashcode of the array. NbtIntArray
deepCopy()
Returns a new wrapper with a copy of the current value. -
-
Constructor Detail
-
NbtIntArray
NbtIntArray()
Creates a new tag with an empty array.
-
NbtIntArray
NbtIntArray(String value)
Parses the string using the same structure which is returned by stringValue.- Parameters:
value
- A string with a structure like[0, -32, 48, 127]
-
NbtIntArray
NbtIntArray(IntArray value)
-
-
Method Detail
-
getStringValue
String getStringValue()
Returns a string representation of the tag's value.
The NbtList and the array types will have an output similar to a normal List and NbtCompound to a normal Map.
The class names of the NbtList's and NbtCompound's children will expose.
The returned string is compatible with string constructors of the same type.
Be aware that this may be a slow operation on big lists, arrays or compounds.
-
deepCopy
NbtIntArray deepCopy()
Returns a new wrapper with a copy of the current value.
-
-
-
-