Simplified Java API, correct extraction of key and val from a map entry