Java HashSet Create hashSetOf(T... ts)

Here you can find the source of hashSetOf(T... ts)

Description

hash Set Of

License

Open Source License

Declaration

public static <T> Set<T> hashSetOf(T... ts) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.Collections;

import java.util.HashSet;
import java.util.Set;

public class Main {
    public static <T> Set<T> hashSetOf(T... ts) {
        Set<T> results = new HashSet<>();
        Collections.addAll(results, ts);
        return results;
    }// w w w  .j  ava 2  s . c  om
}

Related

  1. hashSet()
  2. hashSet()
  3. hashset_to_int_array(Set hs)
  4. hashSetFromArray(final T[] objs)
  5. hashSetOf(T... elements)
  6. identityHashSet()
  7. isValidTagException(HashSet tagExceptions, String buffer)
  8. newHashSet(boolean optimized, T... array)
  9. newHashSet(E... elements)