class _Sets {

    public static <T> Set<T> unmodifiable(@Nullable Iterable<T> iterable) {
        if(iterable==null) {
            return Collections.emptySet();
        }
        return _NullSafe.stream(iterable)
                .collect(toUnmodifiable(LinkedHashSet::new)); // preserve order
    }

}