SetExtensions<E> extension

Extensions for Set operations and utilities.

on

Methods

differenceWith(Set<E> other) Set<E>

Available on Set<E>, provided by the SetExtensions extension

Returns a new set with the elements of other removed from this set.
intersectionWith(Set<E> other) Set<E>

Available on Set<E>, provided by the SetExtensions extension

Returns a new set containing only the elements present in both sets.
isDisjointWith(Set<E> other) bool

Available on Set<E>, provided by the SetExtensions extension

Returns true if the two sets share no elements.
isSubsetOf(Set<E> other) bool

Available on Set<E>, provided by the SetExtensions extension

Returns true if every element of this set is contained in other.
isSupersetOf(Set<E> other) bool

Available on Set<E>, provided by the SetExtensions extension

Returns true if this set contains every element of other.
symmetricDifference(Set<E> other) Set<E>

Available on Set<E>, provided by the SetExtensions extension

Returns the elements present in exactly one of the two sets.
toggle(E element) Set<E>

Available on Set<E>, provided by the SetExtensions extension

Returns a new set with element added if absent, or removed if present.
unionWith(Set<E> other) Set<E>

Available on Set<E>, provided by the SetExtensions extension

Returns a new set containing the elements in either this set or other.