opennlp.uima.util
Class AnnotationComparator
java.lang.Object
opennlp.uima.util.AnnotationComparator
- All Implemented Interfaces:
- Comparator<org.apache.uima.cas.text.AnnotationFS>
public class AnnotationComparator
- extends Object
- implements Comparator<org.apache.uima.cas.text.AnnotationFS>
Checks two annotations for equality.
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. |
AnnotationComparator
public AnnotationComparator()
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 Comparator<org.apache.uima.cas.text.AnnotationFS>
- Parameters:
a
- - first annotationb
- - second annotation
- Returns:
- 0 if equals, < 0 if before and > 0 if after
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.