Instances of a structure provide copying methods:
copy()
returns a shallow copy of the structure instance, and
frozenCopy()
returns a read-only shallow copy.
Trying to invoke any setter methods on an instance obtained through frozenCopy()
raises a
java.lang.IllegalStateException
.
The result of calling copy()
on a frozen instance is a mutable copy, not a frozen
copy.