All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.buildobjects.process.Helper Maven / Gradle / Ivy

There is a newer version: 2.8.2
Show newest version
package org.buildobjects.process;

import java.util.HashSet;
import java.util.Set;

import static java.util.Arrays.asList;

public class Helper {

    public static  Set asSet(T... elements) {
        HashSet set = new HashSet();
        set.addAll(asList(elements));
        return set;
    }

    public static Set asSet(int[] elements) {
        HashSet set = new HashSet();
        for (int element : elements) {
            set.add(element);
        }
        return set;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy