Added ordering of results by name as well as keywords

This commit is contained in:
2019-01-26 15:43:42 +01:00
parent 7ce8b83d16
commit b639e36961
2 changed files with 36 additions and 3 deletions

View File

@@ -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);
}
}