code: public static <T> Set<T> toSet(final T[] array) {
  
      if (isNotEmpty(array)) {
        Set<T> set = new HashSet<T>(array.length);
        for (T element : array) {
          set.add(element);
        }
        return set;
      } else {
        return new HashSet<T>(0);
      }
    }
docs: 将给定数组转换成Set。注意:相同hashCode的元素将只保留一个。Convert given array to a set.
  
  @param array 源数组。source array.
  @return 一个保留所有唯一元素的Set。a set have all unique element of array.