public FeatureList selectByAttribute ( String key ) { FeatureList list = new FeatureList ( ) ; if ( featindex . containsKey ( key ) ) { Map < String , List < FeatureI > > featsmap = featindex . get ( key ) ; if ( null != featsmap ) { for ( List < FeatureI > feats : featsmap . values ( ) ) { list . addAll ( Collections . unmodifiableCollection ( feats ) ) ; } return list ; } } for ( FeatureI f : this ) { if ( f . hasAttribute ( key ) ) { list . add ( f ) ; } } return list ; }
Create a list of all features that include the specified attribute key .