@Test public void testSetCreation() { Set<String> items = CollectionsBuilder.setOf("Hello", "bob", "world"); assertThat(items).containsExactlyInAnyOrder("Hello", "bob", "world"); }
public static <T> Set<T> setOf(T... items) { HashSet<T> set = new HashSet<T>(); for (T item : items) { set.add(item); } return Collections.unmodifiableSet(set); }
CollectionsBuilder { public static <T> Set<T> setOf(T... items) { HashSet<T> set = new HashSet<T>(); for (T item : items) { set.add(item); } return Collections.unmodifiableSet(set); } }
CollectionsBuilder { public static <T> Set<T> setOf(T... items) { HashSet<T> set = new HashSet<T>(); for (T item : items) { set.add(item); } return Collections.unmodifiableSet(set); } private  CollectionsBuilder(); }
CollectionsBuilder { public static <T> Set<T> setOf(T... items) { HashSet<T> set = new HashSet<T>(); for (T item : items) { set.add(item); } return Collections.unmodifiableSet(set); } private  CollectionsBuilder(); static Set<T> setOf(T... items); }
CollectionsBuilder { public static <T> Set<T> setOf(T... items) { HashSet<T> set = new HashSet<T>(); for (T item : items) { set.add(item); } return Collections.unmodifiableSet(set); } private  CollectionsBuilder(); static Set<T> setOf(T... items);  }