title: Use of guava immutable collection as method parameter and/or return type
body: <p>I am trying to determine what the best practices would be for an ImmutableList.  Below is a simplistic example that will help drive my questions:</p>
  
  <p>Ex:</p>
  
  <pre><code>public ImmutableCollection&lt;Foo&gt; getFooOne(ImmutableList&lt;Foo&gt; fooInput){ 
     //.. do some work
     ImmutableList&lt;Foo&gt; fooOther = // something generated during the code
     return fooOther;
  }
  
  public Collection&lt;Foo&gt; getFooTwo(List&lt;Foo&gt; fooInput){
     //.. do some work
     List&lt;Foo&gt; fooOther = // something generated during the code
     return ImmutableList.copyOf(fooOther);
  }
  
  public void doSomethingOne(){
    ImmutableCollection&lt;Foo&gt; myFoo = getFooOne(myList);
    ...
    someOtherMethod(myFoo);
  }
  
  public void doSomethingTwo(){
    Collection&lt;Foo&gt; myFoo = getFooOne(myList);
    ...
    someOtherMethod(myFoo);
  }
  </code></pre>
  
  <p>My Questions:</p>
  
  <ol>
  <li><p>Which makes the most sense to use in an application? [doSomethingOne and getFooOne] or [doSomethingTwo and fooTwo]?  In other words if you know you are using ImmutableCollections does it make sense to keep casting back and forth and doing copyOf(), or just use Immutable everywhere?</p></li>
  <li><p>These examples are public methods which could imply that other people use them.  Would any of these answers change if the methods were private and used internally?</p></li>
  <li><p>If a user tries to add anything to an immutable List an exception will be thrown.  Because they may not be aware of this, wouldn't it make more sense to explicitly return an ImmutableCollection instead of a Collection?</p></li>
  </ol>