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

net.serenitybdd.core.collect.NewSet Maven / Gradle / Ivy

There is a newer version: 4.1.20
Show newest version
package net.serenitybdd.core.collect;

import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

public class NewSet {
    public static  Set copyOf(E[] elements) {
        return new HashSet<>(Arrays.asList(elements));
    }

    public static  Set copyOf(Collection elements) {
        return new HashSet(elements);
    }

    public static  Set of() {
        return new HashSet<>();
    }

    public static  Set of(E element) {
        return new HashSet<>(Arrays.asList(element));
    }

    public static  Set of(E... elements) {
        return new HashSet<>(Arrays.asList(elements));
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy