org.argouml.ui.explorer
Class NameOrder
java.lang.Object
org.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. |
NameOrder
public NameOrder()
- Creates a new instance of NameOrder.
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 Baseobj1
- Diagram or Base
- Returns:
- 0 if invalid params. 0 if the objects are equally named.
A positive or negative int if the names differ.
getName
private String getName(Object obj)
- Get the name of the diagram or model element.
- Parameters:
obj
- the item to fetch name from
- Returns:
- the name
toString
public String toString()
- See Also:
Object.toString()