// Regular Java
-public Integer albuquerqueToLA(Map> map) {
+public Integer albuquerqueToLA(Map<String, Integer> map) {
Map m = map.get("Albuquerque");
if (m != null) return m.get("Los Angeles"); // May return null.
}
// Functional Java with product and option types.
-public Option albuquerqueToLA(TreeMap, Integer>() map) {
+public Option albuquerqueToLA(TreeMap<String, Integer>() map) {
return m.get(p("Albuquerque", "Los Angeles"));
}