java.lang.Object
xyz.ronella.trivial.decorator.Mutable<TYPE_OBJECT>
- Type Parameters:
TYPE_OBJECT- The type of immutable object.
A convenience class that accepts an immutable object and making it possible to be replaced within itself.
This means keeping the reference of this class intact while changing the immutable object it carries.
- Since:
- 2.9.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget()Access the immutable object.voidset(TYPE_OBJECT object) Replace the current immutable object.
-
Constructor Details
-
Mutable
Creates an instance of Mutable.- Parameters:
object- The immutable object to carry.
-
-
Method Details
-
get
Access the immutable object.- Returns:
- The immutable object.
-
set
Replace the current immutable object.- Parameters:
object- The new immutable object.
-