public class SpecifiedSkillTypeSkillComparator extends java.lang.Object implements java.util.Comparator<java.util.Map<? extends ID,Skill>>
Note: this comparator imposes orderings that are inconsistent with equals.
In order to overcome the inconsistency with equals this comparator allows the introduction of a sub-comparator which is applied in cases of equality.
|Constructor and Description|
Creates a new BestSkillComparator object.
|Modifier and Type||Method and Description|
Compares its two arguments for order according to their skills.
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public SpecifiedSkillTypeSkillComparator(SkillType skillType, java.util.Comparator<? super Skill> skillComparator, java.util.Comparator<? super java.util.Map<? extends ID,Skill>> subComparator)
skillType- used to determine the best skill in each of the two collections of skills to be compared.
skillComparator- used to compare the two best skills.
subComparator- applied when the best skills are equal or cannot be determined.