SetBasics<E> extension

Utility extension methods for the native Set class.

on

Methods

classify<K>(K classifier(E element)) Map<K, Set<E>>
Returns a map grouping all elements of this with the same value for classifier.
isDisjointWith(Set<Object> other) bool
Returns true if this and other have no elements in common.
isEqualTo(Set<Object> other) bool
Returns true if this and other contain exactly the same elements.
isIntersectingWith(Set<Object> other) bool
Returns true if this and other have at least one element in common.
isStrictSubsetOf(Set<Object> other) bool
Returns true if every element of this is contained in other and at least one element of other is not contained in this.
isStrictSupersetOf(Set<Object> other) bool
Returns true if every element of other is contained in this and at least one element of this is not contained in other.
isSubsetOf(Set<Object> other) bool
Returns true if every element of this is contained in other.
isSupersetOf(Set<Object> other) bool
Returns true if every element of other is contained in this.
takeRandom({int? seed}) → E?
Removes a random element of this and returns it.