Creates an immutable type that omits methods that signal modification of the object such as
doAdd or setValues. Omitted perfixes are do*** and set***.
All fields on the class become readonly on the resulting type and the mutable type cannot be assigned
to the immutable type.
Type Parameters
T
Note
It is important the type T type follows the convention that all methods that modify the object
are prefixed with do*** or set***. Otherwise, the immutable contract is violated and the type
can still mutate by calling methods that modify the properties internally.
Creates an immutable type that omits methods that signal modification of the object such as
doAddorsetValues. Omitted perfixes aredo***andset***. All fields on the class becomereadonlyon the resulting type and the mutable type cannot be assigned to the immutable type.