Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: Carlos Wu
Added: May 22, 2018 1:50 AM
Views: 18
  1.  Set<Dea> deaSet = new TreeSet<Dea>(new Comparator<Dea>() {
  2.      @Override
  3.      public int compare(Dea d1, Dea d2) {
  4.          return new CompareToBuilder()
  5.                  .append(d1.getDeaNumber(), d2.getDeaNumber())
  6.                  .append(d1.getState(), d1.getState())
  7.                  .append(d1.getExpirationDate(), d2.getExpirationDate())
  8.                  .toComparison();
  9.      }
  10.  });