@Retention(value=SOURCE) @Target(value=TYPE) public @interface Updatable
UnsupportedOperationException
is thrown in implementations of such methods. Emphasis on
"individual" elements or entries means that clear()
operation is allowed. See exact list
of allowed and disallowed operations for
Collections
(including Sets
) and
Maps
.
Think about updatable containers as "non-decreasing", which could be "reset"
from time to time by calling clear()
.
In real practice individual element or entry removals are often not needed. On the other hand, prohibition of removals permits faster implementation of hash table-based containers and iterators over many data structures.
com.koloboke.compile.mutability
,
Mutable