package guava.collection;

import com.google.common.collect.ImmutableSet;
import org.junit.Test;

/**
 * Created by Linuxea on 2017/8/18.
 */
public class CollectionTest {

	@Test
	public void test1(){
		ImmutableSet immutableSet = ImmutableSet.of(1,2,3,4,4,5,8,9,10);
		System.out.println(immutableSet.asList());
		System.out.println(immutableSet.toString());

		ImmutableSet copyImmutable = ImmutableSet.copyOf(immutableSet);
		System.out.println(copyImmutable);
	}

}

@@ -53,28 +53,17 @@
 collect.
-ImmutableSet
+*
 ;%0Aimport
@@ -80,16 +80,39 @@
 .Test;%0A%0A
+import java.util.Map;%0A%0A
 /**%0A * C
@@ -433,16 +433,16 @@
 leSet);%0A
-
 %09%09System
@@ -474,10 +474,871 @@
 e);%0A%09%7D%0A%0A
+%09@Test%0A%09public void test2()%7B%0A%09%09ImmutableMap map =%0A%09%09%09%09ImmutableMap.of(%22name%22,%22linuxea%22,%22sex%22, %22boy%22,%22age%22,2);%0A%09%09System.out.println(map);%0A%09%7D%0A%0A%09@Test%0A%09public void test3()%7B%0A%09%09ImmutableMultiset.of();%0A%09%7D%0A%0A%09@Test%0A%09public void test4()%7B%0A%09%09Multiset multiset = HashMultiset.create();%0A%09%09multiset.add(1);%0A%09%09multiset.add(2);%0A%09%09multiset.add(1);%0A%09%09int oneCount = multiset.count(1);%0A%09%09int twoCount = multiset.count(2);%0A%09%09System.out.println(oneCount);%0A%09%09System.out.println(twoCount);%0A%0A%09%09System.out.println(multiset.elementSet());%0A%09%7D%0A%0A%0A%09@Test%0A%09public void test7()%7B%0A%09%09Multimap multimap = HashMultimap.create();%0A%09%09multimap.put(%22name%22, %22linuxea%22);%0A%09%09multimap.put(%22friends%22,%22a%22);%0A%09%09multimap.put(%22friends%22,%22b%22);%0A%09%09multimap.put(%22friends%22,%22c%22);%0A%09%09multimap.put(%22friends%22,%22d%22);%0A%09%09System.out.println(multimap);%0A%0A%09%09Map%3CString, String%3E map = multimap.asMap();%0A%09%09System.out.println(map);%0A%09%7D%0A%0A
 %7D%0A

add multimap test:/