UnionSetController<E> class Null safety

A controller that exposes a view of the union of a collection of sets.

This is a convenience class for creating a UnionSet whose contents change over the lifetime of a class. For example:

class Engine {
  Set<Test> get activeTests => _activeTestsGroup.set;
  final _activeTestsGroup = UnionSetController<Test>();

  void addSuite(Suite suite) {
    _activeTestsGroup.add(suite.tests);
    _runSuite(suite);
    _activeTestsGroup.remove(suite.tests);
  }
}

Constructors

UnionSetController({bool disjoint = false})
Creates a set of sets that provides a view of the union of those sets.

Properties

hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
set UnionSet<E>
The UnionSet that provides a view of the union of sets in this.
final

Methods

add(Set<E> component) → void
Adds the contents of component to set.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
remove(Set<E> component) bool
Removes the contents of component to set.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited