I'm using Google's ImmutableList class http://google-collections.googlecode.com/svn/trunk/javadoc/com/google/common/collect/ImmutableList.html
I'm looking for a method which takes an existing ImmutableList and an extra element (of the same type), and returns a new ImmutableList that contains the old elements plus the new one.
Perhaps I'm missing something obvious in the docs?
You could do it the following way:
Edit: @JB Nizets solution looks more readable :)