public void addOptionsToProperties ( Properties properties ) { if ( parsedProperties != null ) { for ( Object propKey : parsedProperties . keySet ( ) ) { String name = ( String ) propKey ; String value = parsedProperties . getProperty ( name ) ; // This filters out all trailing items. if ( ! name . matches ( "^[0-9]+$" ) ) { properties . setProperty ( name , value ) ; } } } }
If a command line has been parsed calling this method sets all of its options that were set to the specified properties .