@ Override public boolean add ( FeatureI feature ) { if ( mLocation == null ) { mLocation = feature . location ( ) . plus ( ) ; } else if ( null != feature . location ( ) ) { mLocation = mLocation . union ( feature . location ( ) . plus ( ) ) ; } for ( Entry < String , String > entry : feature . getAttributes ( ) . entrySet ( ) ) { if ( featindex . containsKey ( entry . getKey ( ) ) ) { Map < String , List < FeatureI > > feat = featindex . get ( entry . getKey ( ) ) ; if ( feat == null ) { feat = new HashMap < String , List < FeatureI > > ( ) ; } List < FeatureI > features = feat . get ( entry . getValue ( ) ) ; if ( features == null ) { features = new ArrayList < FeatureI > ( ) ; } features . add ( feature ) ; feat . put ( entry . getValue ( ) , features ) ; featindex . put ( entry . getKey ( ) , feat ) ; //featindex.put(key, value) } } return super . add ( feature ) ; }
Add specified feature to the end of the list . Updates the bounding location of the feature list if needed .