public class ListTag extends SpecificTag implements java.lang.Iterable<SpecificTag>
| Modifier and Type | Field and Description |
|---|---|
java.util.List<SpecificTag> |
items |
int |
type |
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 |
|---|
ListTag(int type,
java.util.List<? extends SpecificTag> items) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(SpecificTag node)
Append an item to this list.
|
ListTag |
asList()
Returns this tag if it is a list tag, otherwise an empty list.
|
boolean |
equals(java.lang.Object obj) |
Tag |
get(int i)
Retrieves the item at index
i. |
int |
getType()
The type of tags stored in this list.
|
int |
hashCode() |
boolean |
isEmpty() |
boolean |
isList() |
java.util.Iterator<SpecificTag> |
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(int i,
SpecificTag node)
Replaces the item at index
i with the new node node. |
int |
size()
The number of items in this list.
|
java.lang.String |
tagName() |
int |
tagType() |
java.lang.String |
toString() |
java.lang.String |
type() |
void |
write(java.io.DataOutputStream out) |
clone, read, writeTypeasCompound, boolValue, boolValue, byteArray, byteArray, byteValue, byteValue, doubleValue, doubleValue, dumpTree, error, extraInfo, floatValue, floatValue, get, intArray, intArray, intValue, intValue, isByteArray, isCompoundTag, isEnd, isError, isIntArray, isLongArray, isNamed, longArray, longArray, longValue, longValue, printTagInfo, same, set, shortValue, shortValue, stringValue, stringValue, unpackpublic final int type
public final java.util.List<SpecificTag> items
public ListTag(int type,
java.util.List<? extends SpecificTag> items)
type - the type of tag that is stored in this listitems - the items of this listpublic static SpecificTag read(java.io.DataInputStream in)
public void write(java.io.DataOutputStream out)
throws java.io.IOException
public int getType()
public int size()
public void add(SpecificTag node)
public void set(int i,
SpecificTag node)
i with the new node node.public java.lang.String type()
public void printTag(java.lang.StringBuilder buff,
java.lang.String indent)
Tagpublic int tagType()
tagType in class SpecificTagpublic java.util.Iterator<SpecificTag> iterator()
iterator in interface java.lang.Iterable<SpecificTag>public ListTag asList()
Tagpublic boolean isEmpty()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object