@ Override public Collection < BioPAXElement > generate ( Match match , int ... ind ) { Collection < BioPAXElement > gen = new HashSet < BioPAXElement > ( con [ 0 ] . generate ( match , ind ) ) ; Set < BioPAXElement > input = new HashSet < BioPAXElement > ( ) ; Set < BioPAXElement > output = new HashSet < BioPAXElement > ( gen ) ; int [ ] tempInd = { 0 , 1 } ; for ( int i = 1 ; i < con . length ; i ++ ) { if ( output . isEmpty ( ) ) break ; input . clear ( ) ; input . addAll ( output ) ; output . clear ( ) ; for ( BioPAXElement ele : input ) { Match m = new Match ( 2 ) ; m . set ( ele , 0 ) ; output . addAll ( con [ i ] . generate ( m , tempInd ) ) ; } } return output ; }
Chains the member constraints and returns the output of the last constraint .