Java tutorial
//package com.java2s; //License from project: Apache License import java.util.HashSet; import java.util.Set; public class Main { final static public int INITIAL_CAPACITY = 20; final static public Set<Object> createSet() { return createSet(INITIAL_CAPACITY); } final static public Set<Object> createSet(final int size) { return new HashSet<Object>(size); } final static public Set<Object> createSet(final Set<?> set) { return new HashSet<Object>(set); } }