[
https://issues.apache.org/jira/browse/UIMA-5115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15507569#comment-15507569
]
Richard Eckart de Castilho commented on UIMA-5115:
--------------------------------------------------
Well, Java needs to get the type information from somewhere. For signatures
where some type can be inferred from a parameter, that's nice. That surely
works for `select(Token.class)`, not sure about `select(Token.type)`. It
certainly does not work for `select("my.Token")` unless we use a signature
where the type is inferred from the variable to which the result is assigned,
e.g. (I believe this works...)
{code}
<T extends FeatureStructure> List<T> select(String type);
List<Annotation> tokens = select("my.Token");
{code}
I am bit ambivalent about this type of signature though... it somehow seems to
be more asking for a ClassCastException than `select("my.Token",
Annotation.class)` although I cannot really articulate atm why.
> 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)