When given an Option<?> and a String, it's impossible to correctly parse the given string and then store the parsed value into an OptionMap since generics erases the return type of the parse operation. This can be worked around by delegating to a method which does the work with a type parameter instead of <?>, however this should not be necessary. Instead add a new method to OptionMap which accepts an Option<?> and a String, and does the parse and set in one operation. Also, add a method which performs this operation repeatedly by reading option names and values from a Properties instance.