@@ -0,0 +1,1755 @@
+package com.javalearning.collection;%0A%0Aimport com.google.common.collect.ArrayTable;%0Aimport com.google.common.collect.HashBasedTable;%0Aimport com.google.common.collect.ImmutableTable;%0Aimport com.google.common.collect.Lists;%0A%0A/**%0A * Created by renqun.yuan on 2015/10/19.%0A */%0Apublic class TableExample %7B%0A    public static void arrayTable() %7B%0A        ArrayTable%3CString, String, Integer%3E arrayTable = ArrayTable.%3CString, String, Integer%3Ecreate(Lists.newArrayList(%22hello%22), Lists.newArrayList(%22test%22));%0A        Integer value = arrayTable.get(%22hello%22, %22test%22);%0A        System.out.println(value);%0A%0A//      arrayTable.put(%22hello%22, %22world%22, 2); // IllegalArgumentException: Column must in the column list%0A%0A        arrayTable.put(%22hello%22, %22test%22, 2); // ok%0A        System.out.println(arrayTable.get(%22hello%22, %22test%22));%0A%0A    %7D%0A%0A    public static void hashBasedTable() %7B%0A        HashBasedTable%3CString, String, String%3E hashBasedTable = HashBasedTable.create();%0A        hashBasedTable.put(%22hello%22, %22world%22, %22java%22);%0A        System.out.println(hashBasedTable.get(%22hello%22, %22world%22));%0A%0A        hashBasedTable.put(%22hello%22, %22world%22, %22python%22);%0A        System.out.println(hashBasedTable.get(%22hello%22, %22world%22));%0A    %7D%0A%0A    private static void immutableTable() %7B%0A        ImmutableTable.Builder%3CString, String, String%3E builder = ImmutableTable.builder();%0A        builder.put(%22hello%22, %22world%22, %22java%22);%0A        builder.put(%22hello%22, %22xxxx%22, %22python%22);%0A        ImmutableTable%3CString, String, String%3E immutableTable = builder.build();%0A        System.out.println(immutableTable.size());%0A        System.out.println(immutableTable.get(%22hello%22, %22world%22));%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        arrayTable();%0A        hashBasedTable();%0A        immutableTable();%0A    %7D%0A%7D%0A

add table example