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;
}

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 ; }
remove an option and return its value if it exists .
