org.argouml.ui.explorer
Class TypeThenNameOrder

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

public class TypeThenNameOrder
extends NameOrder

Sorts by user object type, diagrams first, then packages, then other types. sorts by name within type groups.

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

Constructor Summary
TypeThenNameOrder()
          Creates a new instance of TypeThenNameOrder
 
Method Summary
 int compare(Object obj1, Object obj2)
          Compares obj1 and obj2 as per the class description.
 String toString()
           
 
Methods inherited from class org.argouml.ui.explorer.NameOrder
compareUserObjects
 
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

TypeThenNameOrder

public TypeThenNameOrder()
Creates a new instance of TypeThenNameOrder

Method Detail

compare

public int compare(Object obj1,
                   Object obj2)
Compares obj1 and obj2 as per the class description. nulls are sorted first. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

Specified by:
compare in interface Comparator
Overrides:
compare in class NameOrder
See Also:
Comparator.compare(java.lang.Object, java.lang.Object)

toString

public String toString()
Overrides:
toString in class NameOrder
See Also:
Object.toString()


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Cookbook