title: Comparing the same list without redundancy
body: <p>I have this code</p>
  
  <pre><code>public void update(List&lt;GameObject&gt; objects) {
          for (GameObject object1 :objects){
          for (GameObject object2 : objects){
              if (!object1.equals(object2)) object1.collisionHandling(object2);
          }
      }
  </code></pre>
  
  <p>I need to compare all the items but I obviously don't want to compare each list item with itself; so item 1 and item 1 and I also don't want to compare item 2 with 3 and then on the next loop 3 with 2, etc.
  Most of the examples use numbered arrays for (i=0, i&lt;5, i++) but I have a list.
  How would I go about making this code more efficient?</p>
  
  <hr>
  
  <p>EDIT: I can now ignore the same items on the loop just need to stop symmetrical comparisons. 2-3, 3-2 etc.</p>