Java Collection Copy createSet(Collection toCopy)

Here you can find the source of createSet(Collection toCopy)

Description

create Set

License

Open Source License

Declaration

public static Set createSet(Collection toCopy) 

Method Source Code


//package com.java2s;
import java.util.*;

public class Main {
    public static Set createSet() {
        return new HashSet();
    }//from  w  w w .j a  v a  2  s  .  c o m

    public static Set createSet(Collection toCopy) {
        return new HashSet(toCopy);
    }
}

Related

  1. copyIntoCollectionFrom(Collection collection, Iterable iterable)
  2. copyNSorted(final Collection source, final Collection dest, final Comparator order, final int n)
  3. copyRemainder(final T[] sourceArray, final int startIndex, final Collection collector)
  4. copyStringCollection(Collection strings)
  5. copyWithoutNull(Collection orig)
  6. maskedCopyOf(final Collection source, final Collection mask)
  7. shallowCopy(Collection collection)
  8. toUnmodifiableCopy(Collection collection)