| Constructor and Description |
|---|
CompoundTag(String name)
Creates a tag with the specified name.
|
CompoundTag(String name,
Map<String,Tag> value)
Creates a tag with the specified name.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears all tags from this compound tag.
|
CompoundTag |
clone() |
boolean |
contains(String tagName)
Checks whether the compound tag contains a tag with the specified name.
|
void |
destringify(SNBTIO.StringifiedNBTReader in)
Parses this tag from stringified NBT.
|
<T extends Tag> |
get(String tagName)
Gets the tag with the specified name.
|
Map<String,Tag> |
getValue()
Gets the value of this tag.
|
boolean |
isEmpty()
Checks whether the compound tag is empty.
|
Iterator<Tag> |
iterator() |
Set<String> |
keySet()
Gets a set of keys in this compound tag.
|
<T extends Tag> |
put(T tag)
Puts the tag into this compound tag.
|
void |
read(DataInput in)
Reads this tag from an input stream.
|
<T extends Tag> |
remove(String tagName)
Removes a tag from this compound tag.
|
void |
setValue(Map<String,Tag> value)
Sets the value of this tag.
|
int |
size()
Gets the number of tags in this compound tag.
|
void |
stringify(SNBTIO.StringifiedNBTWriter out,
boolean linebreak,
int depth)
Write this tag as stringified NBT.
|
Collection<Tag> |
values()
Gets a collection of tags in this compound tag.
|
void |
write(DataOutput out)
Writes this tag to an output stream.
|
equals, getName, toStringgetClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic CompoundTag(String name)
name - The name of the tag.public Map<String,Tag> getValue()
Tagpublic void setValue(Map<String,Tag> value)
value - New value of this tag.public boolean isEmpty()
public boolean contains(String tagName)
tagName - Name of the tag to check for.public <T extends Tag> T get(String tagName)
T - Type of tag to get.tagName - Name of the tag.public <T extends Tag> T put(T tag)
T - Type of tag to put.tag - Tag to put into this compound tag.public <T extends Tag> T remove(String tagName)
T - Type of tag to remove.tagName - Name of the tag to remove.public Set<String> keySet()
public Collection<Tag> values()
public int size()
public void clear()
public void read(DataInput in) throws IOException
Tagread in class Tagin - Stream to read from.IOException - If an I/O error occurs.public void write(DataOutput out) throws IOException
Tagwrite in class Tagout - Stream to write to.IOException - If an I/O error occurs.public void destringify(SNBTIO.StringifiedNBTReader in) throws IOException
Tagdestringify in class Tagin - String to parse.IOExceptionpublic void stringify(SNBTIO.StringifiedNBTWriter out, boolean linebreak, int depth) throws IOException
Tagstringify in class TagIOExceptionpublic CompoundTag clone()
Copyright © 2021. All rights reserved.