public class InheritanceComparator extends Object implements Comparator, Serializable
Constructor and Description |
---|
InheritanceComparator() |
Modifier and Type | Method and Description |
---|---|
int |
compare(Object o1,
Object o2) |
Class |
getBase() |
void |
setBase(Class base)
Set the least-derived type possible; defaults to
null . |
protected Class |
toClass(Object elem)
Subclasses can override this method to extract the class to compare
on from the elements of the collection.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals
public void setBase(Class base)
null
.public Class getBase()
protected Class toClass(Object elem)
public int compare(Object o1, Object o2)
compare
in interface Comparator
Copyright © 2006–2017 Apache Software Foundation. All rights reserved.