public static <T> Set<T> wrapHashSet(final Collection<T> source) {
        return new HashSet<>(source);
    }
Wrap hash set.

@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