title: What is the use of singletonList?
body: <p>I was looking around for some elegant solution to removing null values from a List. I came across the <a href="https://stackoverflow.com/a/1239631/423969">following post</a>, which says I can use  <code>list.removeAll(Collections.singletonList(null));</code></p>
  
  <p>This, however, throws an <code>UnsupportedOperationException</code>, which I'm assuming is because <code>removeAll()</code> is attempting to do some mutative operation on the immutable singleton collection. Is this correct?</p>
  
  <p>If this is the case, what would be a typical use of this <code>singletonList</code>? To represent a collection of size 1 when you're sure you don't want to actually do anything with the collection?</p>
  
  <p>Thanks in advance.</p>