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