public class ComposedComparator
extends java.lang.Object
implements java.util.Comparator
Constructor and Description |
---|
ComposedComparator() |
Modifier and Type | Method and Description |
---|---|
void |
add(java.util.Comparator c) |
int |
compare(java.lang.Object o1,
java.lang.Object o2)
Compares its two arguments for order.
|
boolean |
equals(java.lang.Object o)
returns if this object is equal to another object
|
int |
hashCode() |
public void add(java.util.Comparator c)
public int compare(java.lang.Object o1, java.lang.Object o2)
Note: this comparator imposes orderings that are inconsistent with equals.
compare
in interface java.util.Comparator
o1
- the first object to be compared.o2
- the second object to be compared.java.lang.ClassCastException
- if the arguments' types prevent them from
being compared by this Comparator.public boolean equals(java.lang.Object o)
equals
in interface java.util.Comparator
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object