@Inherited @Documented @Target(value=TYPE) @Retention(value=RUNTIME) public @interface Immutable
An object is considered immutable, if its representation (usually the data that is included in its block) is fixed. Other objects that are not fully part of its representation but can nonetheless be reached through its fields may still be mutable.
It should always be safe to share immutable objects between various instances and threads. However, it is in general not guaranteed that the hash of immutable objects stays the same. In other words, an immutable object is only conceptually immutable but its values may change. (This is the case with references to persons, which remain constant but can still be merged.)
Copyright © 2017. All rights reserved.