public class CompoundTag extends SpecificTag implements java.lang.Iterable<NamedTag>
The items of a compound tag can be indexed by name.
END, TAG_BYTE, TAG_BYTE_ARRAY, TAG_COMPOUND, TAG_DOUBLE, TAG_END, TAG_FLOAT, TAG_INT, TAG_INT_ARRAY, TAG_LIST, TAG_LONG, TAG_LONG_ARRAY, TAG_SHORT, TAG_STRING| Constructor and Description |
|---|
CompoundTag() |
CompoundTag(java.util.List<? extends NamedTag> items) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(NamedTag node)
Append an item to this compound tag.
|
void |
add(java.lang.String name,
SpecificTag tag) |
CompoundTag |
asCompound()
Returns this tag if it is a list tag, otherwise an empty list.
|
boolean |
equals(java.lang.Object obj) |
Tag |
get(java.lang.String name) |
int |
hashCode() |
boolean |
isCompoundTag() |
boolean |
isEmpty() |
java.util.Iterator<NamedTag> |
iterator() |
void |
printTag(java.lang.StringBuilder buff,
java.lang.String indent)
Print a string representation of this tag to the argument buffer.
|
static SpecificTag |
read(java.io.DataInputStream in) |
void |
set(java.lang.String name,
Tag tag) |
int |
size()
The number of items in this compound tag.
|
java.lang.String |
tagName() |
int |
tagType() |
java.lang.String |
toString() |
java.lang.String |
type() |
void |
write(java.io.DataOutputStream out) |
clone, read, writeTypeasList, boolValue, boolValue, byteArray, byteArray, byteValue, byteValue, doubleValue, doubleValue, dumpTree, error, extraInfo, floatValue, floatValue, get, intArray, intArray, intValue, intValue, isByteArray, isEnd, isError, isIntArray, isList, isLongArray, isNamed, longArray, longArray, longValue, longValue, printTagInfo, same, set, shortValue, shortValue, stringValue, stringValue, unpackpublic CompoundTag()
public CompoundTag(java.util.List<? extends NamedTag> items)
public void add(java.lang.String name,
SpecificTag tag)
public static SpecificTag read(java.io.DataInputStream in)
public void write(java.io.DataOutputStream out)
throws java.io.IOException
public void printTag(java.lang.StringBuilder buff,
java.lang.String indent)
Tagpublic int size()
public void add(NamedTag node)
public java.lang.String type()
public int tagType()
tagType in class SpecificTagpublic boolean isCompoundTag()
isCompoundTag in class Tagpublic java.util.Iterator<NamedTag> iterator()
iterator in interface java.lang.Iterable<NamedTag>public CompoundTag asCompound()
TagasCompound in class Tagpublic boolean isEmpty()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object