ptolemy.actor.util
Class DFUtilities.NamedObjComparator

java.lang.Object
  extended by ptolemy.actor.util.DFUtilities.NamedObjComparator
All Implemented Interfaces:
java.util.Comparator
Enclosing class:
DFUtilities

public static class DFUtilities.NamedObjComparator
extends java.lang.Object
implements java.util.Comparator

A comparator for named objects.


Constructor Summary
DFUtilities.NamedObjComparator()
           
 
Method Summary
 int compare(java.lang.Object object1, java.lang.Object object2)
          Compare two objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

DFUtilities.NamedObjComparator

public DFUtilities.NamedObjComparator()
Method Detail

compare

public int compare(java.lang.Object object1,
                   java.lang.Object object2)
Compare two objects. If the objects are not NamedObjs, then an InternalErrorException is thrown.

Specified by:
compare in interface java.util.Comparator
Parameters:
object1 - The first object to be compared.
object2 - The second object to be compared.
Returns:
0 if the objects are the same.