Comment
Comment by lkitching
Since this defines an interface, does this solve the null problem? e.g.
explicit pattern matching is usually discouraged anyway though, and you can do this now with Optional
Other languages like Scala also have an Option.fold method for this specific case.