public class SimpleAssignmentStrategy.AnalysisContext.LoadComparator extends Object implements Comparator
A member is ordered "lower" than another member if it has a lower member load (as determined by the LoadCalculator). Members with equivalent loads are ordered equivalently.
Note: This comparator does not define an ordering that is "consistent with equals". If used in a context requiring such a natural ordering, it should be chained with comparator that does provide a natural ordering.
| Modifier and Type | Field and Description | 
|---|---|
protected boolean | 
m_fPrimary
Flag for primary or backup load comparison. 
 | 
| Constructor and Description | 
|---|
LoadComparator(boolean fPrimary)
Construct a LoadComparator. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
int | 
compare(Object o1,
       Object o2) | 
boolean | 
isPrimary()
Return true iff the comparator should use the primary load. 
 | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic LoadComparator(boolean fPrimary)
fPrimary - true if the comparator should use the primary load,
                  or false for backup loadpublic boolean isPrimary()
public int compare(Object o1, Object o2)
compare in interface Comparator