Android HashSet Create newHashSet(E... elements)

Here you can find the source of newHashSet(E... elements)

Description

new Hash Set

License

Open Source License

Declaration

public static <E> HashSet<E> newHashSet(E... elements) 

Method Source Code

//package com.java2s;
// Use of this source code is governed by a BSD-style license that can be

import java.util.Collections;
import java.util.HashSet;

public class Main {
    public static <E> HashSet<E> newHashSet(E... elements) {
        HashSet<E> set = new HashSet<E>(elements.length);
        Collections.addAll(set, elements);
        return set;
    }//from  www  .ja  v a  2 s.co m
}

Related

  1. newHashSet()
  2. newHashSet()
  3. newHashSet(String... strings)