Adam Lally wrote:
>> Same issue with using Iterator<AbstractCas>
>> Two quick fixes:  casting:
>> Iterator<AbstractCas> s = (Iterator<AbstractCas>) aCas.getViewIterator();
>> and
>> Iterator<? super CAS> s = aCas.getViewIterator();
>>
>>     
>
> Right.. I think it needs to be like this:
>
> <T extends Iterator<? super CAS>> T getViewIterator()
>   

I tried this, and get for :
Iterator<CAS> s = aCas.getViewIterator();
the message: Bound mismatch: The generic method getViewIterator() of
type CAS is not applicable for the arguments (). The inferred type CAS
is not a valid substitute for the bounded parameter <T extends
Iterator<? super CAS>>
and no quick fixes.

I tried some variants, but couldn't get something that worked...

-Marshall
> But I am not sure the usefulness of this is worth the added complexity.
>   -Adam
>
>
>   

Reply via email to