All Questions
4 questions
23
votes
4
answers
28k
views
Simple builder pattern implementation for building immutable objects
This is a builder pattern implementation to build immutable Person objects:
Person class
...
3
votes
5
answers
276
views
An immutable person
I am trying to model person in OOPS using immutability.
I have created an object bond with age as 25. To change the age I have created a new object and returned it.
...
1
vote
1
answer
181
views
Removing redundancy from an immutable "rules class"
I am writing a board game program in Java. Slightly similar to chess or civilization in that each player has a set of units, and each unit has certain actions that it can take.
The base ...
1
vote
2
answers
695
views
Comments on my Java pattern for Mutable turned Immutable objects
Commenting omitted to give you the idea. I've been toying with this recently as a variant of the Builder pattern. I've recently fallen in love with immutable objects for the benefits they give in ...