Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.Set;

public class Main {
    /**
     * Adds several values to a set.
     * 
     * @param <T>
     *            the set's element type.
     * @param set
     *            the set.
     * @param values
     *            the values to be added.
     * @return the given set.
     */
    @SafeVarargs
    public static <T> Set<T> addToSet(final Set<T> set, final T... values) {
        for (final T t : values) {
            set.add(t);
        }
        return set;
    }
}