class _Sets {

    @SafeVarargs
    public static <T> Set<T> of(T ... elements) {
        _With.requires(elements, "elements");// don't accept null as argument
        if(elements.length==0) {
            return Collections.emptySet();
        }
        return Stream.of(elements)
                .collect(toUnmodifiable(LinkedHashSet::new)); // preserve order
    }

}