Java tutorial
//package com.java2s; import java.util.*; public class Main { public static <A, B> Map<A, B> singletonMap(A a, B b) { Map<A, B> map = new HashMap<A, B>(); map.put(a, b); return map; } }