DOFImmutable InterfaceOpenDOF Object Access Library
DOFImmutable is a marker interface which is a clue to developers that objects may be treated as immutable.

Namespace: org.opendof.core.oal
Assembly: dof-oal (in dof-oal.dll) Version: 7.0.1.2
Syntax

C#
public interface DOFImmutable
Remarks

DOFImmutable is a marker interface which is a clue to developers that objects may be treated as immutable. Immutable objects are thread-safe and never require copying (no clone(), copy constructors, nor defensive copying is ever required). Note that by using final fields, a class is not necessarily immutable. For example, a final ArrayList field is assigned an instance of the List, but the contents can change, causing a need for protections.

See IBM's Java theory and practice: To mutate or not to mutate? for a helpful discussion on class immutability.

See Also

Reference