|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Inherited @Target(value=TYPE) @Retention(value=RUNTIME) public @interface Immutable
Indicates that an instance cannot be changed.
To make something always immutable used the form @Immutable. To make something immutable only once persisted use the form @Immutable(Immutable.ONCE_PERSISTED).
By default any value types are assumed to be immutable, though this can be overridden if
required. Immutable objects that are acting as a value type should almost certainly also follow the
equal-by-content contract.
Value,
EqualByContent| Optional Element Summary | |
|---|---|
When |
value
|
public abstract When value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||