I can recommend learnung some scala, where HashMap extends PartialFunction
I've never looked at scala, but that's really interesting. Do you find that's useful in practice?