title: Order array in every possible sequence
body: <p>I have some complex calculation algorithm that basically tests if some smaller matrixes fit onto another big matrix.<br>
  It depends on the order of the smaller matrixes if all of them fit onto the big matrix or not.
  If the small matrixes don't fit, it should rearrange the ArrayList and try again until all possible orders/sequences were tested.</p>
  
  <p>If I have 5 small matrixes, then there is a total amount of <strong>5! (= 120)</strong> possible orders that the array can have.</p>
  
  <p>My problem is that I have no idea on how to rearrange these objects (matrixes), so I can test every possible order. I hope someone can help me out?</p>