Java Set Create asSet(Collection c)

Here you can find the source of asSet(Collection c)

Description

as Set

License

Open Source License

Declaration

static <T> HashSet<T> asSet(Collection<T> c) 

Method Source Code


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

import java.util.*;

public class Main {
    static <T> HashSet<T> asSet(Collection<T> c) {
        HashSet<T> ret = new HashSet<T>();
        ret.addAll(c);/* ww  w.jav a2s.co  m*/
        return ret;
    }
}

Related

  1. asSet(Collection c)
  2. asSet(Collection c)
  3. asSet(E... elements)
  4. asSet(E... pEntities)
  5. asSet(final E... elements)