public static <T> Set<T> wrap(final Set<T> source) {
        val list = new LinkedHashSet<T>();
        if (source != null && !source.isEmpty()) {
            list.addAll(source);
        }
        return list;
    }
Wrap varargs.

@param <T>    the type parameter
@param source the source
@return the set
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/CollectionUtils.java