import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
class Util {
/**
*
* @param - generic type of returned Set
* @param array - the array that is to be transformed to Set
* @return - Set containing array's elements
*/
public static Set getSetFromArray(T[] array){
List list = Arrays.asList(array);
Set result = new HashSet(list);
return result;
}
}