@ Override public Collection < BioPAXElement > generate ( Match match , int ... ind ) { BioPAXElement ele0 = match . get ( ind [ 0 ] ) ; if ( ele0 == null ) throw new RuntimeException ( "Constraint cannot generate based on null value" ) ; Set vals = pa . getValueFromBean ( ele0 ) ; List < BioPAXElement > list = new ArrayList < BioPAXElement > ( vals . size ( ) ) ; for ( Object o : vals ) { assert o instanceof BioPAXElement ; list . add ( ( BioPAXElement ) o ) ; } return list ; }
Uses the encapsulated PAthAccessor to generate satisfying elements .