title: Sort ObservableList Objects by Their Value Java
body: <p>I have a class Student with these fields:</p>
  
  <pre><code>private int id;
  private String firstName;
  private String lastName;
  private String imageLink;
  private String email;
  private String status;
  private String fullName;
  private int classId;  
  private int percentage;
  Button changeAttendanceButton;
  ImageView attendanceImage;
  ImageView photo;
  </code></pre>
  
  <p>Field "status" can have 2 values: 1. present, 2. absent</p>
  
  <p>Then I have Observable List:</p>
  
  <pre><code>private ObservableList&lt;Student&gt; allStudentsWithStatus = FXCollections.observableArrayList();
  </code></pre>
  
  <p>So I store Students in this list. Each student has either present or absent status. </p>
  
  <p>I need to SORT this ObservableList by status. I want students with present status be first in that list.</p>
  
  <p>Any tips? </p>
  
  <p>I would be grateful for any help. </p>