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

java.lang.Object
  extended by net.ontopia.topicmaps.nav.utils.comparators.AssociationComparator
All Implemented Interfaces:
java.util.Comparator

public class AssociationComparator
extends java.lang.Object
implements java.util.Comparator

INTERNAL: A Comparator for ordering AssociationIFs alphabetically after their type.


Field Summary
protected  java.util.Collection scopes
           
protected  java.util.Comparator tc
           
 
Constructor Summary
AssociationComparator()
          Empty constructor, used on application startup to initialise a "fast" comparator which will compare Associations using no context.
AssociationComparator(java.util.Collection context)
          Constructor used to make a comparator which will compare Associations using the context provided.
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          Compares two AssociationIFs.
 
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 java.util.Comparator tc

scopes

protected java.util.Collection scopes
Constructor Detail

AssociationComparator

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


AssociationComparator

public AssociationComparator(java.util.Collection context)
Constructor used to make a comparator which will compare Associations using the context provided.

Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Compares two AssociationIFs.

Specified by:
compare in interface java.util.Comparator


Copyright © 2000-2012 Ontopia.