T- The type of objects being compared
public class InstanceComparator<T> extends java.lang.Object implements java.util.Comparator<T>
Numbers such that
Longs occur before
Only the specified
instanceOrder classes are considered during comparison.
If two objects are both instances of the ordered type this comparator will return a
0. Consider combining with a
CompoundComparator if additional sorting
|Constructor and Description|
Create a new
public InstanceComparator(java.lang.Class<?>... instanceOrder)
instanceOrder- the ordered list of classes that should be used when comparing objects. Classes earlier in the list will be be given a higher priority.