public static <E> ImmutableSet<E> copyOf(final Collection<? extends E> set) {
        if (N.isNullOrEmpty(set)) {
            return empty();
        }

        return new ImmutableSet<>((set instanceof LinkedHashSet || set instanceof SortedSet) ? new LinkedHashSet<>(set) : new HashSet<>(set));
    }
public static < E > ImmutableSet < E > copyOf ( final Collection < ? extends E > set ) { if ( N . isNullOrEmpty ( set ) ) { return empty ( ) ; } return new ImmutableSet < > ( ( set instanceof LinkedHashSet || set instanceof SortedSet ) ? new LinkedHashSet < > ( set ) : new HashSet < > ( set ) ) ; }
@param set
@return