Added ordering of results by name as well as keywords
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.Objects;
|
||||
|
||||
/*
|
||||
@@ -56,4 +57,13 @@ public interface MultipleHMKeys {
|
||||
|
||||
@Override
|
||||
boolean equals(Object obj);
|
||||
|
||||
default int compareTo(MultipleHMKeys othr){
|
||||
return Comparator.comparing(MultipleHMKeys::getK1)
|
||||
.thenComparing(MultipleHMKeys::getK2)
|
||||
.thenComparing(MultipleHMKeys::getK3)
|
||||
.thenComparing(MultipleHMKeys::getK4)
|
||||
.thenComparing(MultipleHMKeys::getK5)
|
||||
.compare(this, othr);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user