static B lookup_first(Map map, A... keys) { if (map != null && keys != null) for (A key : keys) { B b = map.get(key); if (b != null) ret b; } null; }