title: Adding and removing items to a Guava ImmutableList
body: <p>In Guava, is there an efficient way to add or remove items to an <code>ImmutableList</code> (creating new Lists in the process, of course).</p>
  
  <p>The simplest way I can come up with is this:</p>
  
  <pre><code>private ImmutableList&lt;String&gt; foos = ImmutableList.of();
  
  public void addFoo(final String foo) {
      if (this.foos.isEmpty()) {
          foos = ImmutableList.of(foo);
      } else {
          foos = ImmutableList.&lt;String&gt;builder().addAll(foos).add(foo).build();
      }
  }
  
  public void removeFoo(final String foo) {
      final int index = this.foos.indexOf(foo);
      if (index &gt; -1) {
          final Builder&lt;String&gt; builder = ImmutableList.&lt;String&gt;builder();
          if (index &gt; 0) builder.addAll(this.foos.subList(0, index));
          final int size = this.foos.size();
          if (index &lt; size - 1) builder.addAll(this.foos.subList(index+1, size));
          this.foos = builder.build();
      }
  }
  </code></pre>
  
  <p>What I would like to avoid doing is this:</p>
  
  <pre><code>public void removeFoo(final String foo) {
      final ArrayList&lt;String&gt; tmpList = Lists.newArrayList(this.foos);
      if(tmpList.remove(foo))this.foos=ImmutableList.copyOf(tmpList);
  }
  </code></pre>
  
  <p>But unfortunately it is so much simpler than any Guava-only method I can think of. Have I missed something?</p>