@@ -0,0 +1,1046 @@
+package com.javalearning.collection;%0A%0Aimport com.google.common.collect.BiMap;%0Aimport com.google.common.collect.HashBiMap;%0Aimport com.google.common.collect.ImmutableBiMap;%0A%0A/**%0A * Created by renqun.yuan on 2015/10/16.%0A */%0Apublic class BiMapExample %7B%0A    public static void hashBiMapExample() %7B%0A        HashBiMap%3CString, String%3E biMap = HashBiMap.create();%0A        biMap.put(%22foo%22, %22boy%22);%0A//        biMap.put(%22boy%22, %22boy%22); //IllegalArgumentException: value already present: boy%0A//        biMap.forcePut(%22boy%22, %22boy%22);// ok, foo=boy is removed%0A        System.out.println(biMap);%0A%0A        BiMap%3CString, String%3E inverse = biMap.inverse();%0A%0A        System.out.println(inverse);%0A%0A    %7D%0A%0A    public static void immutableBiMap() %7B%0A        ImmutableBiMap%3CObject, Object%3E immutableBiMap = ImmutableBiMap.builder().put(%22foo%22, %22bar%22).build();%0A%0A        System.out.println(immutableBiMap);%0A%0A        System.out.println(immutableBiMap.inverse());%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        hashBiMapExample();%0A        immutableBiMap();%0A    %7D%0A%7D%0A

add bimapExample