public void addFeature ( String feature ) { if ( feature == null ) { throw new IllegalArgumentException ( "Invalid null argument passed for addFeature" ) ; } feature = feature . trim ( ) ; if ( ! feature . isEmpty ( ) ) { Feature newFeature = new Feature ( ) ; newFeature . addText ( feature ) ; featureList . add ( newFeature ) ; } }
Add a feature into a list .