title: 'transferring' StringBuilder contents to a new ArrayList in java
body: <p>If I have two class constants:</p>
  
  <pre><code>List&lt;String&gt; workingList= new ArrayList&lt;String&gt;();
  StringBuilder holder = new StringBuilder(50);
  </code></pre>
  
  <p>both residing within, call it class <code>StringParser</code> and primary method <code>readStuff()</code>...</p>
  
  <pre><code>public class StringParser{
  
  public void readStuff(){ 
  
  //parsing logic and adding &lt;String&gt; elements to 
  //said workingList...
  
  }//end of method readStuff
  </code></pre>
  
  <p>followed by a method where I inspect the contents of <code>workingList</code>...</p>
  
  <pre><code>public String someReaderMethod()
  { 
    int ind = 0;
    for(int i = 0; i &lt; workingList.size();i++)
    {
      if(workingList.get(i).contains(someExp))
      {
        workingList.remove(ind);
        holder.append(workingList.get(i).toString());
  }
  else
  {
     ++ind;
  }
    }
     return holder.toString();    
  </code></pre>
  
  <p>}    </p>
  
  <p>...given that <code>StringBuilder</code> holder now contains what <code>workingList</code> has removed, is there a way I can 'pass' the contents of <code>StringBuilder</code> to a new <code>ArrayList</code>?</p>