|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.ontopia.topicmaps.nav.utils.comparators.NameComparator
public class NameComparator
INTERNAL: A Comparator for ordering TopicNameIFs and VariantNameIFs alphabetically (case-independent).
| Field Summary | |
|---|---|
protected Collection<TopicIF> |
scopes
|
protected static URILocator |
SORT_LOCATOR
|
protected VariantNameGrabber |
sortNameGrabber
|
protected VariantNameGrabber |
vnGrabber
|
| Constructor Summary | |
|---|---|
NameComparator()
Empty constructor, used on application startup to initialise a "fast" comparator which will compare TopicNameIFs and VariantNameIFs using no context. |
|
NameComparator(Collection<TopicIF> context)
Constructor used to make a comparator which will compare TopicNameIFs and VariantNameIFs using the context provided. |
|
| Method Summary | |
|---|---|
int |
compare(NameIF o1,
NameIF o2)
Compares two TopicNameIFs / VariantNameIFs. |
protected String |
getName(NameIF obj)
INTERNAL: helper method which gets out of the object the base name or variant name value. |
protected void |
initSortNameGrabber(TMObjectIF tmObj)
INTERNAL: setup variant sort name grabber. |
| 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 |
| Field Detail |
|---|
protected Collection<TopicIF> scopes
protected VariantNameGrabber vnGrabber
protected VariantNameGrabber sortNameGrabber
protected static final URILocator SORT_LOCATOR
| Constructor Detail |
|---|
public NameComparator()
public NameComparator(Collection<TopicIF> context)
| Method Detail |
|---|
protected final void initSortNameGrabber(TMObjectIF tmObj)
protected String getName(NameIF obj)
public int compare(NameIF o1,
NameIF o2)
compare in interface Comparator<NameIF>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||