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.LinkedHashSet;

import java.util.Set;

public class Main {
    /**
     * it returns an ordered Set implementation with the specified initial capacity
     * 
     * @return
     */
    public static <T> Set<T> newOrderedSet(int initialCapacity) {
        return new LinkedHashSet<>(initialCapacity);
    }

    /**
     * it returns an ordered Set implementation
     * 
     * @return
     */
    public static <T> Set<T> newOrderedSet() {
        return new LinkedHashSet<>();
    }
}