util-common/src/main/java/io/activej/common/Utils.java
/**
	 * Returns a difference of two sets
	 * <p>
	 * No guarantee on a mutability of a resulting set is made,
	 * so set should be considered unmodifiable
	 * <p>
	 * If any of provided sets is modified, the behaviour of a resulting set is undefined
	 */
Returns a difference of two sets

No guarantee on a mutability of a resulting set is made,
so set should be considered unmodifiable

If any of provided sets is modified, the behaviour of a resulting set is undefined
Returns a difference of two sets No guarantee on a mutability of a resulting set is made so set should be considered unmodifiable If any of provided sets is modified the behaviour of a resulting set is undefined
@SuppressWarnings("unchecked")
	public static <T> Set<T> difference(Set<? extends T> a, Set<? extends T> b) {
		if (b.isEmpty()) return (Set<T>) a;
		return a.stream().filter(not(b::contains)).collect(toSet());
	}
@ SuppressWarnings ( "unchecked" ) public static < T > Set < T > difference ( Set < ? extends T > a , Set < ? extends T > b ) { if ( b . isEmpty ( ) ) return ( Set < T > ) a ; return a . stream ( ) . filter ( not ( b :: contains ) ) . collect ( toSet ( ) ) ; }
Returns a difference of two sets
 <p>
 No guarantee on a mutability of a resulting set is made,
 so set should be considered unmodifiable
 <p>
 If any of provided sets is modified, the behaviour of a resulting set is undefined
Returns a difference of two sets <p > No guarantee on a mutability of a resulting set is made so set should be considered unmodifiable <p > If any of provided sets is modified the behaviour of a resulting set is undefined