opennlp.uima.util
Class AnnotationComparator

java.lang.Object
  extended by opennlp.uima.util.AnnotationComparator
Type Parameters:
T -
All Implemented Interfaces:
java.util.Comparator<org.apache.uima.cas.text.AnnotationFS>

public class AnnotationComparator
extends java.lang.Object
implements java.util.Comparator<org.apache.uima.cas.text.AnnotationFS>

Checks two annotations for equality.


Constructor Summary
AnnotationComparator()
           
 
Method Summary
 int compare(org.apache.uima.cas.text.AnnotationFS a, org.apache.uima.cas.text.AnnotationFS b)
          Compares the begin indexes of the annotations.
 
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

AnnotationComparator

public AnnotationComparator()
Method Detail

compare

public int compare(org.apache.uima.cas.text.AnnotationFS a,
                   org.apache.uima.cas.text.AnnotationFS b)
Compares the begin indexes of the annotations.

Specified by:
compare in interface java.util.Comparator<org.apache.uima.cas.text.AnnotationFS>
Parameters:
a - - first anntoation
b - - second annotation
Returns:
0 if equals, < 0 if before and > 0 if after


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.