public Option defaultValue ( String defaultValue ) throws RequiredParametersException { if ( this . choices . isEmpty ( ) ) { return this . setDefaultValue ( defaultValue ) ; } else { if ( this . choices . contains ( defaultValue ) ) { return this . setDefaultValue ( defaultValue ) ; } else { throw new RequiredParametersException ( "Default value " + defaultValue + " is not in the list of valid values for option " + this . longName ) ; } } }
Define a default value for the option .