The above would throw an exception. In practice, it turns out to be annoying to have to check for the presence of a property before calling valueOf. Almost always, the desired behavior is for valueOf to return null if the property is not present. Furthermore, to get the Property object, which has isPresent() and ifPresent() is easy via the PropertyDefTrait of() method.
Original functionality would throw an exception of valueOf was called for a property that was not present. Ex.
The above would throw an exception. In practice, it turns out to be annoying to have to check for the presence of a property before calling valueOf. Almost always, the desired behavior is for valueOf to return null if the property is not present. Furthermore, to get the Property object, which has isPresent() and ifPresent() is easy via the PropertyDefTrait of() method.
valueOf() is a convenience method.