uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marshall Schor (JIRA)" <...@uima.apache.org>
Subject [jira] [Commented] (UIMA-5115) uv3 select() api for iterators and streams over CAS contents
Date Mon, 03 Oct 2016 18:57:20 GMT

    [ https://issues.apache.org/jira/browse/UIMA-5115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15543128#comment-15543128
] 

Marshall Schor commented on UIMA-5115:
--------------------------------------

Re: generic typing.
The select(...) variants are in Cas, JCas, FSIndex, FSArray and FSList (at the moment).
Of these, FSIndex carries a generic type (that is the class is defined as FSIndex<T>.

Using that and a "static" form of select, we can replace:
   FSIterator<Token> = cas.<Token>select(indexOverToken) with
   FSIterator<Token> = SelectFSs.select(indexOverToken) and the type inferencing will
work.
      // the SelectFSs. prefix could be omitted if a static import was used

This seems due to reducing the level of method chaining, by using a static method..

To make this more pervasive, we could add a generic type argument to FSArray and FSList. We
could even have both static and non-static select methods. Do these seem like a good ideas?
  

> uv3 select() api for iterators and streams over CAS contents
> ------------------------------------------------------------
>
>                 Key: UIMA-5115
>                 URL: https://issues.apache.org/jira/browse/UIMA-5115
>             Project: UIMA
>          Issue Type: New Feature
>          Components: Core Java Framework
>            Reporter: Marshall Schor
>            Priority: Minor
>             Fix For: 3.0.0SDKexp
>
>
> Design and implement a select() API based on uimaFIT's select, integrated well with Java
8 concepts.  Initial discussions in UIMA-1524.  Wiki with diagram: https://cwiki.apache.org/confluence/display/UIMA/UV3+Iterator+support



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message