title: while-else-loop
body: <p>Of course this is an impossible statement in java (to-date), however ideally I would like to implement it as it is at the heart of many iterations. For example the first multiple times it is called I'm doing it 650,000+ times when it is creating the <code>ArrayList</code>.
  Unfortunately the reality is that my actual code does not have the <code>set</code> inside the <code>else</code> loop; thus it will pass over both the <code>add</code> and then the <code>set</code> commands and wasting time.</p>
  
  <p>After that I have it also in another loop where it is only performing the set as the data is already created and this is multi-nested with in many others so it is a lengthy process.</p>
  
  <pre><code>ArrayList&lt;Integer&gt;  dataColLinker = new java.util.ArrayList&lt;Integer&gt;();
  ...
  ...
  public void setLinkerAt( int value, int rowIndex) {
      ...
      while(rowIndex &gt;= dataColLinker.size()) {
          dataColLinker.add(value);
      } else {
          dataColLinker.set(rowIndex, value);
      }
  </code></pre>
  
  <p>Any ideas or theories?
  I'm unsure about speeds in java when it comes to <code>if</code> statements and <code>ArrayList</code> commands and so on</p>