Android Set Create CreateHashSet(T[] array)

Here you can find the source of CreateHashSet(T[] array)

Description

Create Hash Set

Declaration

public static <T> Set<T> CreateHashSet(T[] array) 

Method Source Code

//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;
    }
}

Related

  1. CreateSortedSet(T[] array)
  2. asSet(E... es)