public List < BioPAXElement > get ( String [ ] label , Pattern p ) { if ( label == null ) return Collections . emptyList ( ) ; List < BioPAXElement > list = new ArrayList < BioPAXElement > ( label . length ) ; for ( String lab : label ) { list . add ( variables [ p . indexOf ( lab ) ] ) ; } return list ; }
Gets elements corresponding to the given labels in the pattern .