public static < T extends BioPAXElement > Set < T > searchAndCollect ( Model model , Pattern pattern , int index , Class < T > c ) { return searchAndCollect ( model . getObjects ( pattern . getStartingClass ( ) ) , pattern , index , c ) ; }
Searches a model for the given pattern then collects the specified elements of the matches and returns .