uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörn Kottmann <kottm...@gmail.com>
Subject Re: [jira] Commented: (UIMA-1523) Generics: FSIterator.moveTo(T) should be moveTo(FeatureStructure)
Date Wed, 26 Aug 2009 08:25:15 GMT
Jörn Kottmann (JIRA) wrote:
>     [ https://issues.apache.org/jira/browse/UIMA-1523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12747822#action_12747822
> Jörn Kottmann commented on UIMA-1523:
> -------------------------------------
> The implementation of moveTo in UnambiguousIteratorImpl and Subiterator must be changed
to handle non AnnotationFS FeatureStructures correctly.
What should be done in this case ?

Lets say I have a Subitertor and call moveTo and pass in a 
FeatureStructure object which
does not have the AnnoationFS type, now the annotation comparator (which 
through generics is limited to AnnotationFS types)
cannot be used in the binary search to find the insert location of the FS.

To solve this we could either reconsider the generification of the 
AnnotationComparator or
add a special case and place the iterator at a fixed position.

Well I assume we want to take the first option, because thats how it has 
been before.
To make a bit cleaner I suggest that we rename the AnnotationComparator 
(its an internal protected class) to something
like FeatureStructureComparator.


View raw message