edu.pdx.cs399J.examples
Class ClassComparator
java.lang.Object
edu.pdx.cs399J.examples.ClassComparator
- All Implemented Interfaces:
- Comparator<Object>
public class ClassComparator
- extends Object
- implements Comparator<Object>
This class is a Comparator that compares
Objects based on the name of their classes.
|
Method Summary |
int |
compare(Object o1,
Object o2)
|
static void |
main(String[] args)
Create a bunch of object and store them in a set using a
ClassComparator. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClassComparator
public ClassComparator()
compare
public int compare(Object o1,
Object o2)
- Specified by:
compare in interface Comparator<Object>
main
public static void main(String[] args)
- Create a bunch of object and store them in a set using a
ClassComparator.
Copyright © 2000-2009 Portland State University. All Rights Reserved.