net.sourceforge.nite.gui.textviewer
Class NTextElementPositionComparator

java.lang.Object
  extended by net.sourceforge.nite.gui.textviewer.NTextElementPositionComparator
All Implemented Interfaces:
java.util.Comparator

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


Constructor Summary
NTextElementPositionComparator()
           
 
Method Summary
 int compare(java.lang.Object obj1, java.lang.Object obj2)
          Compare objects assuming that both are text elements.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

NTextElementPositionComparator

public NTextElementPositionComparator()
Method Detail

compare

public int compare(java.lang.Object obj1,
                   java.lang.Object obj2)
Compare objects assuming that both are text elements. If both are non-null, the element with a smaller position is assument to precede the one with the larger position. The null element is assumed to precede anything.

Specified by:
compare in interface java.util.Comparator