public class FactionDetailComparator extends java.lang.Object implements java.util.Comparator<Faction>
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. I.e. if the two compared factions belong to the same trust level and they would be regarded as equal by this comparator, instead of 0 the result of the sub-comparator's comparison is returned.
|Modifier and Type||Field and Description|
|Constructor and Description|
Creates a new FactionDetailComparator object.
|Modifier and Type||Method and Description|
Compares the exact trust levels of the two factions.
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected java.util.Comparator<? super Faction> sameTrustSubCmp
public FactionDetailComparator(java.util.Comparator<? super Faction> sameFactionSubComparator)
sameFactionSubComparator- if two factions with the same trust level are compared, this sub-comparator is applied if it is not null.