net.ontopia.topicmaps.nav.utils.comparators
Class LocatorComparator

java.lang.Object
  extended by net.ontopia.topicmaps.nav.utils.comparators.LocatorComparator
All Implemented Interfaces:
Comparator<LocatorIF>

public class LocatorComparator
extends Object
implements Comparator<LocatorIF>

INTERNAL: A Comparator for ordering locators alphabetically.


Field Summary
protected  Collection<TopicIF> scopes
           
protected  Comparator<String> tc
           
 
Constructor Summary
LocatorComparator()
          Empty constructor, used on application startup to initialise a "fast" comparator which will compare Locators using no context.
LocatorComparator(Collection<TopicIF> context)
          Constructor used to make a comparator which will compare Locators using the context provided.
 
Method Summary
 int compare(LocatorIF l1, LocatorIF l2)
          Compares two LocatorIFs
 
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

tc

protected Comparator<String> tc

scopes

protected Collection<TopicIF> scopes
Constructor Detail

LocatorComparator

public LocatorComparator()
Empty constructor, used on application startup to initialise a "fast" comparator which will compare Locators using no context.


LocatorComparator

public LocatorComparator(Collection<TopicIF> context)
Constructor used to make a comparator which will compare Locators using the context provided. This implementation doesn't use the context yet.

Method Detail

compare

public int compare(LocatorIF l1,
                   LocatorIF l2)
Compares two LocatorIFs

Specified by:
compare in interface Comparator<LocatorIF>


Copyright © 2000-2012 Ontopia.