@SuppressWarnings("unchecked") public static <T extends FeatureStructure>List<T> toList(FSArray array){
  if (array == null) {
    return new ArrayList<T>();
  }
 else {
    return (List<T>)Arrays.asList(array.toArray());
  }
}

@ SuppressWarnings ( "unchecked" ) public static < T extends FeatureStructure > List < T > toList ( FSArray array ) { if ( array == null ) { return new ArrayList < T > ( ) ; } else { return ( List < T > ) Arrays . asList ( array . toArray ( ) ) ; } }
create a new list from an fsarray
