Sorting a list of objects in Java according to booleans
<p>I have this class:</p>

<pre><code>public class Turn {

public boolean turnMoved;
public int moveSelectionX;
public int moveSelectionY;
public int moveTargetX;
public int moveTargetY;

public boolean turnFired;
public int shotSelectionX;
public int shotSelectionY;
public int shotTargetX;
public int shotTargetY;

//Set this to true when doing a turn if we fired before moving
//Else if we do move/shot in the wrong order, we might select an empty cell
boolean firedFirst = false;
}
</code></pre>

<p>Elsewhere in my program, I create a list of these objects. Once the list is completed, I'd like to sort the list in this order, so that all the objects that satisfy 1. will be at the front of the list, and so on:</p>

<ol>
<li>turnMoved &amp;&amp; turnFired == true </li>
<li>turnFired == true</li>
<li>turnMoved == true</li>
<li>turnMoved &amp;&amp; turnFired == false</li>
</ol>

<p>What would the easiest way to do this be?</p>
