TType
- - type of the value that is stored.public interface NbtBase<TType>
Use NbtFactory
to load or create an instance.
Modifier and Type | Method and Description |
---|---|
boolean |
accept(NbtVisitor visitor)
Accepts a NBT visitor.
|
NbtBase<TType> |
deepClone()
Clone the current NBT tag.
|
java.lang.String |
getName()
Retrieve the name of this NBT tag.
|
NbtType |
getType()
Retrieve the type of this NBT element.
|
TType |
getValue()
Retrieve the value of this NBT tag.
|
void |
setName(java.lang.String name)
Set the name of this NBT tag.
|
void |
setValue(TType newValue)
Set the value of this NBT tag.
|
boolean accept(NbtVisitor visitor)
visitor
- - the hierarchical NBT visitor.NbtType getType()
java.lang.String getName()
This will be an empty string if the NBT tag is stored in a list.
void setName(java.lang.String name)
This will be ignored if the NBT tag is stored in a list.
name
- - name of the tag.TType getValue()
Is either a primitive wrapper
, String
,
List
or a Map
.
All operations that modify collections directly, such as List.add(Object)
or
Map.clear()
, are considered optional. This also include members in Iterator
and
ListIterator
. Operations that are not implemented throw a
UnsupportedOperationException
.
void setValue(TType newValue)
newValue
- - the new value of this tag.