title: Compare two List<E> regardless of order
body: <p>I have two E type lists List list1, List list2. The E object is a POJO class that contains a row of the following data. Both of the lists contain same data. For example at the last column if I change a false to true it cannot detect.</p>
  
  <pre><code>| statusId  | statusName                                | statusState | isRequire            |
  | 3         | Approved                                  | APPROVED    | false                |
  | 201       | Attributed                                | REJECTED    | true                 |
  | 202       | Denied                                    | REJECTED    | false                |
  | 204       | Fraud                                     | REJECTED    | false                |
  | 205       | Insufficient                              | REJECTED    | false                |
  | 206       | Invalid                                   | REJECTED    | false                |
  | 207       | Cancelled                                 | REJECTED    | false                |
  | 208       | Cannot traced                             | REJECTED    | false                |
  | 209       | Transaction online                        | REJECTED    | false                |
  | 210       | Voucher                                   | REJECTED    | false                |
  | 211       | does not meet req                         | REJECTED    | false                |
  </code></pre>
  
  <p>I want to write a function so that if data is those two lists are different then that can be detectected. Following is my code but seems like it always give 'false' whether data is same or different in both lists.</p>
  
  <pre><code>   private boolean compareLists(List&lt;Status&gt; actualStatuses, List&lt;Status&gt; expectedStatuses) {
      boolean indicator = false;
      if (actualStatuses!= null &amp;&amp; expectedStatuses!=null &amp;&amp; actualStatuses.size() == expectedStatuses.size()){
          for (Status expectedStatusData : expectedStatuses){
              for(Status actualStatusData : actualStatuses){
                  if(actualStatusData.getStatusId() == expectedStatusData.getStatusId()
                          &amp;&amp; actualStatusData.getStatusName().equals(expectedStatusData.getStatusName())
                          &amp;&amp; actualStatusData.getStatusState().equals(expectedStatusData.getStatusState())
                          &amp;&amp; actualStatusData.isEnable() == expectedStatusData.isEnable()
                          &amp;&amp; actualClaimStatusData.isRequire() == expectedStatusData.isRequire()){
                      indicator = true;
                      break;
                  }
                  else indicator = false;
              }
          }
          if (indicator)
              return true;
      }
      else
          return false;
  
      return indicator;
  }
  </code></pre>