Here you can find the source of CreateHashSet(T[] array)
public static <T> Set<T> CreateHashSet(T[] array)
//package com.java2s; import java.util.HashSet; import java.util.Set; public class Main { public static <T> Set<T> CreateHashSet(T[] array) { Set<T> set = new HashSet<T>(); for (T v : array) { set.add(v);//from w w w .j a v a 2s . co m } return set; } }