title: Moving items around in an ArrayList
body: <p>I've been playing around with <code>ArrayList</code>s. What I'm trying to achieve is a method to do something like this:</p>
  
  <pre><code>Item 1
  Item 2
  Item 3
  Item 4
  </code></pre>
  
  <p>I'm trying to be able to move items up in the list, unless it is already at the top in which case it will stay the same. For example, if item 3 was moved the list would be:</p>
  
  <pre><code>Item 1
  Item 3
  Item 2
  Item 4
  </code></pre>
  
  <p>From my small understanding at the moment then I would want something along the lines of:</p>
  
  <pre><code>IF arrayname index is not equal to 0
  THEN move up
  ELSE do nothing
  </code></pre>
  
  <p>The part I'm struggling with is the "move up" part. Any tips or code samples of how this could be achieved are much appreciated.</p>