Effectively a list of a named tags. Order is not guaranteed.
- Author:
- SyntaxError404
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs an empty compound tagTagCompound(Map<String, Tag<?>> tags) Constructs a compound tag -
Method Summary
Modifier and TypeMethodDescriptionclear()Removes all of the mappings from this mapbooleancontains(TagCompound other) Checks whether all mappings of the specified compound tag also exist within this compound tag and areequal.Tag<?>Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the keyTag<?>Returns the value to which the specified key is mapped, ordefaultValueif this map contains no mapping for the key.byteReturns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the keybyte[]getByteArray(String key) Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the keygetByteArrayTag(String key) Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the keygetByteTag(String key) Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the keygetCompound(String key) Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the keydoubleReturns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the keygetDoubleTag(String key) Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the keyfloatReturns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the keygetFloatTag(String key) Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the keyintReturns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the keyint[]getIntArray(String key) Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the keygetIntArrayTag(String key) Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the keyReturns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the keyTagList<?>Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the keylongReturns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the keylong[]getLongArray(String key) Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the keygetLongArrayTag(String key) Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the keygetLongTag(String key) Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the keyshortReturns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the keygetShortTag(String key) Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the keyReturns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the keygetStringTag(String key) Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the keybooleanReturns true if this map contains a mapping for the specified keybooleanisEmpty()Returnstrueif this compound tag contains no key-value mappings.keySet()Returns a set view of the keys contained in this mapAssociates the specified value with the specified key in this compound tagAssociates the specified value with the specified key in this compound tagputByteArray(String key, byte[] value) Associates the specified value with the specified key in this compound tagputByteArrayTag(String key, TagByteArray value) Associates the specified value with the specified key in this compound tagputByteTag(String key, TagByte value) Associates the specified value with the specified key in this compound tagputCompound(String key, TagCompound value) Associates the specified value with the specified key in this compound tagAssociates the specified value with the specified key in this compound tagputDoubleTag(String key, TagDouble value) Associates the specified value with the specified key in this compound tagAssociates the specified value with the specified key in this compound tagputFloatTag(String key, TagFloat value) Associates the specified value with the specified key in this compound tagAssociates the specified value with the specified key in this compound tagputIntArray(String key, int[] value) Associates the specified value with the specified key in this compound tagputIntArrayTag(String key, TagIntArray value) Associates the specified value with the specified key in this compound tagAssociates the specified value with the specified key in this compound tagAssociates the specified value with the specified key in this compound tagAssociates the specified value with the specified key in this compound tagputLongArray(String key, long[] value) Associates the specified value with the specified key in this compound tagputLongArrayTag(String key, TagLongArray value) Associates the specified value with the specified key in this compound tagputLongTag(String key, TagLong value) Associates the specified value with the specified key in this compound tagAssociates the specified value with the specified key in this compound tagputShortTag(String key, TagShort value) Associates the specified value with the specified key in this compound tagAssociates the specified value with the specified key in this compound tagputStringTag(String key, TagString value) Associates the specified value with the specified key in this compound tagRemoves the mapping for a key from this compound tag if it is presentintsize()Returns the number of key-value mappings in this compound tag
-
Constructor Details
-
TagCompound
public TagCompound()Constructs an empty compound tag -
TagCompound
Constructs a compound tag- Parameters:
tags- the map whose mappings are to be placed in this map
-
-
Method Details
-
has
Returns true if this map contains a mapping for the specified key- Parameters:
key- key whose presence in this map is to be tested- Returns:
- true if this map contains a mapping for the specified key
-
get
Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the key- Parameters:
key- key of the mapping to be returned- Returns:
- the element at the specified position in this list
-
getByte
Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the key- Parameters:
key- key of the mapping to be returned- Returns:
- the element at the specified position in this list
-
getShort
Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the key- Parameters:
key- key of the mapping to be returned- Returns:
- the element at the specified position in this list
-
getInt
Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the key- Parameters:
key- key of the mapping to be returned- Returns:
- the element at the specified position in this list
-
getLong
Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the key- Parameters:
key- key of the mapping to be returned- Returns:
- the element at the specified position in this list
-
getFloat
Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the key- Parameters:
key- key of the mapping to be returned- Returns:
- the element at the specified position in this list
-
getDouble
Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the key- Parameters:
key- key of the mapping to be returned- Returns:
- the element at the specified position in this list
-
getByteArray
Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the key- Parameters:
key- key of the mapping to be returned- Returns:
- the element at the specified position in this list
-
getIntArray
Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the key- Parameters:
key- key of the mapping to be returned- Returns:
- the element at the specified position in this list
-
getLongArray
Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the key- Parameters:
key- key of the mapping to be returned- Returns:
- the element at the specified position in this list
-
getString
Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the key- Parameters:
key- key of the mapping to be returned- Returns:
- the element at the specified position in this list
-
getByteTag
Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the key- Parameters:
key- key of the mapping to be returned- Returns:
- the element at the specified position in this list
-
getShortTag
Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the key- Parameters:
key- key of the mapping to be returned- Returns:
- the element at the specified position in this list
-
getIntTag
Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the key- Parameters:
key- key of the mapping to be returned- Returns:
- the element at the specified position in this list
-
getLongTag
Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the key- Parameters:
key- key of the mapping to be returned- Returns:
- the element at the specified position in this list
-
getFloatTag
Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the key- Parameters:
key- key of the mapping to be returned- Returns:
- the element at the specified position in this list
-
getDoubleTag
Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the key- Parameters:
key- key of the mapping to be returned- Returns:
- the element at the specified position in this list
-
getByteArrayTag
Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the key- Parameters:
key- key of the mapping to be returned- Returns:
- the element at the specified position in this list
-
getIntArrayTag
Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the key- Parameters:
key- key of the mapping to be returned- Returns:
- the element at the specified position in this list
-
getLongArrayTag
Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the key- Parameters:
key- key of the mapping to be returned- Returns:
- the element at the specified position in this list
-
getStringTag
Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the key- Parameters:
key- key of the mapping to be returned- Returns:
- the element at the specified position in this list
-
getCompound
Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the key- Parameters:
key- key of the mapping to be returned- Returns:
- the element at the specified position in this list
-
getList
Returns the value to which the specified key is mapped, or throws aNBTExceptionif this map contains no mapping for the key- Parameters:
key- key of the mapping to be returned- Returns:
- the element at the specified position in this list
-
get
Returns the value to which the specified key is mapped, ordefaultValueif this map contains no mapping for the key.- Parameters:
key- the key whose associated value is to be returneddefaultValue- the default mapping for the key- Returns:
- the value to which the specified key is mapped, or
defaultValueif this map contains no mapping for the key
-
put
Associates the specified value with the specified key in this compound tag- Parameters:
key- key with which the specified value is to be associatedvalue- value to be associated with the specified key- Returns:
- this compound tag
-
putByte
Associates the specified value with the specified key in this compound tag- Parameters:
key- key with which the specified value is to be associatedvalue- value to be associated with the specified key- Returns:
- this compound tag
-
putShort
Associates the specified value with the specified key in this compound tag- Parameters:
key- key with which the specified value is to be associatedvalue- value to be associated with the specified key- Returns:
- this compound tag
-
putInt
Associates the specified value with the specified key in this compound tag- Parameters:
key- key with which the specified value is to be associatedvalue- value to be associated with the specified key- Returns:
- this compound tag
-
putLong
Associates the specified value with the specified key in this compound tag- Parameters:
key- key with which the specified value is to be associatedvalue- value to be associated with the specified key- Returns:
- this compound tag
-
putFloat
Associates the specified value with the specified key in this compound tag- Parameters:
key- key with which the specified value is to be associatedvalue- value to be associated with the specified key- Returns:
- this compound tag
-
putDouble
Associates the specified value with the specified key in this compound tag- Parameters:
key- key with which the specified value is to be associatedvalue- value to be associated with the specified key- Returns:
- this compound tag
-
putByteArray
Associates the specified value with the specified key in this compound tag- Parameters:
key- key with which the specified value is to be associatedvalue- value to be associated with the specified key- Returns:
- this compound tag
-
putIntArray
Associates the specified value with the specified key in this compound tag- Parameters:
key- key with which the specified value is to be associatedvalue- value to be associated with the specified key- Returns:
- this compound tag
-
putLongArray
Associates the specified value with the specified key in this compound tag- Parameters:
key- key with which the specified value is to be associatedvalue- value to be associated with the specified key- Returns:
- this compound tag
-
putString
Associates the specified value with the specified key in this compound tag- Parameters:
key- key with which the specified value is to be associatedvalue- value to be associated with the specified key- Returns:
- this compound tag
-
putByteTag
Associates the specified value with the specified key in this compound tag- Parameters:
key- key with which the specified value is to be associatedvalue- value to be associated with the specified key- Returns:
- this compound tag
-
putShortTag
Associates the specified value with the specified key in this compound tag- Parameters:
key- key with which the specified value is to be associatedvalue- value to be associated with the specified key- Returns:
- this compound tag
-
putIntTag
Associates the specified value with the specified key in this compound tag- Parameters:
key- key with which the specified value is to be associatedvalue- value to be associated with the specified key- Returns:
- this compound tag
-
putLongTag
Associates the specified value with the specified key in this compound tag- Parameters:
key- key with which the specified value is to be associatedvalue- value to be associated with the specified key- Returns:
- this compound tag
-
putFloatTag
Associates the specified value with the specified key in this compound tag- Parameters:
key- key with which the specified value is to be associatedvalue- value to be associated with the specified key- Returns:
- this compound tag
-
putDoubleTag
Associates the specified value with the specified key in this compound tag- Parameters:
key- key with which the specified value is to be associatedvalue- value to be associated with the specified key- Returns:
- this compound tag
-
putByteArrayTag
Associates the specified value with the specified key in this compound tag- Parameters:
key- key with which the specified value is to be associatedvalue- value to be associated with the specified key- Returns:
- this compound tag
-
putIntArrayTag
Associates the specified value with the specified key in this compound tag- Parameters:
key- key with which the specified value is to be associatedvalue- value to be associated with the specified key- Returns:
- this compound tag
-
putLongArrayTag
Associates the specified value with the specified key in this compound tag- Parameters:
key- key with which the specified value is to be associatedvalue- value to be associated with the specified key- Returns:
- this compound tag
-
putStringTag
Associates the specified value with the specified key in this compound tag- Parameters:
key- key with which the specified value is to be associatedvalue- value to be associated with the specified key- Returns:
- this compound tag
-
putCompound
Associates the specified value with the specified key in this compound tag- Parameters:
key- key with which the specified value is to be associatedvalue- value to be associated with the specified key- Returns:
- this compound tag
-
putList
Associates the specified value with the specified key in this compound tag- Parameters:
key- key with which the specified value is to be associatedvalue- value to be associated with the specified key- Returns:
- this compound tag
-
remove
Removes the mapping for a key from this compound tag if it is present- Parameters:
key- key whose mapping is to be removed from the compound tag- Returns:
- this compound tag
-
size
public int size()Returns the number of key-value mappings in this compound tag- Returns:
- the number of key-value mappings in this compound tag
-
isEmpty
public boolean isEmpty()Returnstrueif this compound tag contains no key-value mappings.- Returns:
trueif this compound tag contains no key-value mappings
-
keySet
Returns a set view of the keys contained in this map- Returns:
- a set view of the keys contained in this map
-
clear
Removes all of the mappings from this map- Returns:
- this compound tag
-
contains
Checks whether all mappings of the specified compound tag also exist within this compound tag and areequal.- Parameters:
other- compound to be checked- Returns:
- whether this compound tag is a superset of the specified compound tag
-