@Test public void asSet() throws Exception { final Set<Integer> expected = IntStream.range(0, 5).boxed().collect(Collectors.toSet()); Assert.assertEquals(expected, CollectionUtils.asSet(0, 1, 2, 3, 4)); }
public static <T> Set<T> asSet(T... items) { final HashSet<T> result = new HashSet<>(items.length); result.addAll(Arrays.asList(items)); return Collections.unmodifiableSet(result); }
CollectionUtils { public static <T> Set<T> asSet(T... items) { final HashSet<T> result = new HashSet<>(items.length); result.addAll(Arrays.asList(items)); return Collections.unmodifiableSet(result); } }
CollectionUtils { public static <T> Set<T> asSet(T... items) { final HashSet<T> result = new HashSet<>(items.length); result.addAll(Arrays.asList(items)); return Collections.unmodifiableSet(result); } private  CollectionUtils(); }
CollectionUtils { public static <T> Set<T> asSet(T... items) { final HashSet<T> result = new HashSet<>(items.length); result.addAll(Arrays.asList(items)); return Collections.unmodifiableSet(result); } private  CollectionUtils(); static ArrayList<L> filter(List<L> list, Predicate<L> predicate); static ArrayList<T> map(List<G> input, Function1<T, G> function); static Set<T> map(Set<G> input, Function1<T, G> function); static boolean isNullOrEmpty(Collection<?> input); static List<Integer> asList(int... ids); static Set<T> asSet(T... items); }
CollectionUtils { public static <T> Set<T> asSet(T... items) { final HashSet<T> result = new HashSet<>(items.length); result.addAll(Arrays.asList(items)); return Collections.unmodifiableSet(result); } private  CollectionUtils(); static ArrayList<L> filter(List<L> list, Predicate<L> predicate); static ArrayList<T> map(List<G> input, Function1<T, G> function); static Set<T> map(Set<G> input, Function1<T, G> function); static boolean isNullOrEmpty(Collection<?> input); static List<Integer> asList(int... ids); static Set<T> asSet(T... items);  }