Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

import java.util.Collections;

import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

public class Main {
    public static <T> Set<T> newConcurentHashSet() {
        return Collections.newSetFromMap(new ConcurrentHashMap<T, Boolean>());
    }

    public static <T> Set<T> newConcurentHashSet(int initialCapacity) {
        return Collections.newSetFromMap(new ConcurrentHashMap<T, Boolean>(initialCapacity));
    }
}