public Structure select ( List < String > memberNames ) { Structure result = ( Structure ) copy ( ) ; List < Variable > members = new ArrayList <> ( ) ; for ( String name : memberNames ) { Variable m = findVariable ( name ) ; if ( null != m ) members . add ( m ) ; } result . setMemberVariables ( members ) ; result . isSubset = true ; return result ; }
Create a subset of the Structure consisting only of the given member variables