Modifying Immutable Objects With Chained Methods

When you are coding with immutable objects, there are many times where you not only need to initially define them, but may want to create derivative versions of an existing instance. You might want to consider using chained methods to make your code more concise or to take advantage of default or optional parameters.

You have probably implemented an immutable class with final fields with values passed into the constructor like this immutable ConnectionProperties class below:...

Read More »

By: FeedsGeneral - Monday, 12 March

Related Posts