org.argouml.ui.explorer
Class NameOrder

java.lang.Object
  extended byorg.argouml.ui.explorer.NameOrder
All Implemented Interfaces:
Comparator
Direct Known Subclasses:
TypeThenNameOrder

public class NameOrder
extends Object
implements Comparator

Sorts explorer nodes by their user object name.

Since:
0.15.2, Created on 28 September 2003, 10:02

Constructor Summary
NameOrder()
          Creates a new instance of NameOrder.
 
Method Summary
 int compare(Object obj1, Object obj2)
           
protected  int compareUserObjects(Object obj, Object obj1)
          Alphabetic ordering of user object names instead of type names.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

NameOrder

public NameOrder()
Creates a new instance of NameOrder.

Method Detail

compare

public int compare(Object obj1,
                   Object obj2)
Specified by:
compare in interface Comparator
See Also:
Comparator.compare(java.lang.Object, java.lang.Object)

compareUserObjects

protected int compareUserObjects(Object obj,
                                 Object obj1)
Alphabetic ordering of user object names instead of type names.

Parameters:
obj - Diagram or Base
obj1 - Diagram or Base
Returns:
0 if invalid params. 0 if the objects are equally named. A positive or negative int if the names differ.

toString

public String toString()
See Also:
Object.toString()


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Cookbook