Java Set Create asSet(T... items)

Here you can find the source of asSet(T... items)

Description

as Set

License

Apache License

Declaration

public static <T> Set<T> asSet(T... items) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.*;

public class Main {
    public static <T> Set<T> asSet(T... items) {
        Set<T> set = new LinkedHashSet<T>();
        Collections.addAll(set, items);

        return set;
    }//from ww  w.  j  a v  a  2 s.c o m
}

Related

  1. asSet(T... array)
  2. asSet(T... element)
  3. asSet(T... elements)
  4. asSet(T... elements)
  5. asSet(T... elements)
  6. asSet(T... ts)
  7. asSet(T... ts)
  8. asSet(T... values)
  9. asSet(T... values)