public class InheritanceComparator
extends java.lang.Object
implements java.util.Comparator, java.io.Serializable
Constructor and Description |
---|
InheritanceComparator() |
Modifier and Type | Method and Description |
---|---|
int |
compare(java.lang.Object o1,
java.lang.Object o2) |
java.lang.Class |
getBase() |
void |
setBase(java.lang.Class base)
Set the least-derived type possible; defaults to
null . |
protected java.lang.Class |
toClass(java.lang.Object elem)
Subclasses can override this method to extract the class to compare
on from the elements of the collection.
|
public void setBase(java.lang.Class base)
null
.public java.lang.Class getBase()
protected java.lang.Class toClass(java.lang.Object elem)
public int compare(java.lang.Object o1, java.lang.Object o2)
compare
in interface java.util.Comparator
Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.