Java tutorial
//package com.java2s; // This source code is available under the terms of the Affero General Public License v3. import java.util.Arrays; import java.util.HashSet; import java.util.Set; public class Main { public static <T> Set<T> asSet(T... a) { return new HashSet<T>(Arrays.asList(a)); } }