de.topicmapslab.majortom.io
Class CXTMTopicMapWriter.AbstractComparator<T>

java.lang.Object
  extended by de.topicmapslab.majortom.io.CXTMTopicMapWriter.AbstractComparator<T>
All Implemented Interfaces:
java.util.Comparator<T>
Direct Known Subclasses:
CXTMTopicMapWriter.AbstractDatatypeAwareComparator, CXTMTopicMapWriter.AssociationComparator, CXTMTopicMapWriter.NameComparator, CXTMTopicMapWriter.RoleIgnoreParentComparator
Enclosing class:
CXTMTopicMapWriter

private abstract class CXTMTopicMapWriter.AbstractComparator<T>
extends java.lang.Object
implements java.util.Comparator<T>

Abstract comparator that provides some utility methods which handle common comparisons.


Constructor Summary
private CXTMTopicMapWriter.AbstractComparator()
           
 
Method Summary
(package private)  int compareScope(org.tmapi.core.Scoped o1, org.tmapi.core.Scoped o2)
          Extracts the scope of the scoped Topic Maps constructs and compares them.
(package private)  int compareString(java.lang.String o1, java.lang.String o2)
           
(package private)  int compareType(org.tmapi.core.Typed o1, org.tmapi.core.Typed o2)
          Extracts the type of the typed Topic Maps constructs and compares the topics.
 
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
compare, equals
 

Constructor Detail

CXTMTopicMapWriter.AbstractComparator

private CXTMTopicMapWriter.AbstractComparator()
Method Detail

compareString

int compareString(java.lang.String o1,
                  java.lang.String o2)

compareType

int compareType(org.tmapi.core.Typed o1,
                org.tmapi.core.Typed o2)
Extracts the type of the typed Topic Maps constructs and compares the topics.

Parameters:
o1 - The first typed Topic Maps construct.
o2 - The second typed Topic Maps construct.
Returns:
A negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

compareScope

int compareScope(org.tmapi.core.Scoped o1,
                 org.tmapi.core.Scoped o2)
Extracts the scope of the scoped Topic Maps constructs and compares them.

Parameters:
o1 - The first scoped Topic Maps construct.
o2 - The second scoped Topic Maps construct.
Returns:
A negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.