Ejemplo n.º 1
0
 @Override
 public boolean equals(Object rhs) {
   if (rhs instanceof SearchResultEntry) {
     SearchResultEntry obj = (SearchResultEntry) rhs;
     return obj.getId().equals(this.getId()) && obj.getScore() == this.getScore();
   } else {
     return false;
   }
 }
Ejemplo n.º 2
0
 @Override
 public int compareTo(SearchResultEntry obj) {
   return Float.compare(this.score, obj.getScore());
 }