question: public static FSArray toFSArray ( JCas jCas , Collection < ? extends FeatureStructure > collection ) { if ( collection == null || collection . isEmpty ( ) ) { return new FSArray ( jCas , 0 ) ; } else { FSArray array = new FSArray ( jCas , collection . size ( ) ) ; int i = 0 ; for ( FeatureStructure fs : collection ) { array . set ( i , fs ) ; i ++ ; } return array ; } }
target:  Convert a collection (of annotation) to an FSArray