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: generics: FSIndexRepository
Date Thu, 13 Aug 2009 09:33:33 GMT
Jörn Kottmann wrote:
> Jörn Kottmann wrote:
>> Jörn Kottmann wrote:
>>> Hi,
>>>
>>> after all the discussion we had I think thats the correct
>>> way to generify FSIndexRepository:
>>>
>>> interface FSIndexRepository {
>>> FSIndex<FeatureStructure> getIndex(String label);
>>> FSIterator<FeatureStructure> getAllIndexedFS(Type aType);
>>> ...
>>> }
>> It generified now and also getIndexes:
>> Iterator<FSIndex<FeatureStructure>> getIndexes();
> Stupid question, but how can a FSIndex<FeatureStructure> be converted 
> into a FSIndex<AnnotationFS> ?  Since casting directy is not possible, 
> do I need to write some kind of adapter which does the casting for me ?
FSIndex<FeatureStruture> indexFS
FSIndex<AnnotationFS> indexAnnotationFS = (FSIndex<AnnotationFS>) 
(Object) indexFS;

Could it be done like this ?

Jörn

Mime
View raw message