1

One of my preferred functions is Collections.unmodifiableList(List).

What a relief was the introduction of the collection FW. And the Function above changed the usage of lists (also sets, maps) a lot. You could now just expose your internal list without worrying that somebody messes with the data.

Comments
Add Comment