code: public static <T> Collection<T> asImmutable(Collection<? extends T> self) {
          return Collections.unmodifiableCollection(self);
      }
docs: A convenience method for creating an immutable Collection.
  <pre class="groovyTestCase">def mutable = [1,2,3]
  def immutable = mutable.asImmutable()
  mutable &lt;&lt; 4
  try {
  immutable &lt;&lt; 4
  assert false
  } catch (UnsupportedOperationException) {
  assert true
  }</pre>
  
  @param self a Collection
  @return an immutable Collection
  @see java.util.Collections#unmodifiableCollection(java.util.Collection)
  @since 1.5.0