question: public String removeOption ( String name ) { if ( options != null ) { ReplOption existingOption = null ; for ( ReplOption replOption : options ) { if ( name . equals ( replOption . getOptionName ( ) ) ) existingOption = replOption ; } if ( existingOption != null ) { options . remove ( existingOption ) ; return existingOption . getOptionValue ( ) ; } } return null ; }
target:  Remove an option and return its value if it exists.