NestedNBTHolderMap¶
A mutable map of nested NBTHolders, keyed by String, declared via NBTHolder.nestedMapField. Each entry is itself a self-contained, independently field()-declared NBTHolder rather than one shared value shape - useful when a map's entries are heterogeneous (e.g. one holder type per registry-driven "kind" of thing an entry represents), which NBTHolder.mapField can't express since it needs one fixed, kotlinx.serialization-compatible value type for every entry. T is the common upper bound every entry shares - plain NBTHolder itself if entries have nothing more specific in common, or a narrower shared supertype (a caller can still insert any subtype of T via getOrPut's own type parameter) - so callers get correctly-typed entries back without a manual cast at every read site.
Structural changes (getOrPut, remove) mark the owning holder dirty/resynced automatically. Mutating an existing entry's own field in place does not - call touch afterward.
Properties¶
keys¶
size¶
Functions¶
clear¶
fun clear()
containsKey¶
fun containsKey(key: String): Boolean
get¶
getOrPut¶
Returns the existing nested holder at key, or builds one via factory, stores it, and marks this dirty.
iterator¶
remove¶
Removes and returns the nested holder at key, marking this dirty - null if it wasn't present.
touch¶
fun touch()
Marks this dirty without a structural change - call after mutating an existing entry's own field(s) in place.