Package org.jetbrains.annotations
Annotation Type Unmodifiable
-
@Documented @Retention(CLASS) @Target(TYPE_USE) public @interface Unmodifiable
An annotation which marks aCollection
orMap
type as unmodifiable. A collection or a map is unmodifiable if any mutator methods (e.g.Collection.add(Object)
) throw exception or have no effect, and the object references stored as collection elements, map keys, and map values are never changed. The referenced objects themselves still could be changed if they are mutable.- Since:
- 19.0.0
- See Also:
UnmodifiableView