MultiSet<T> class

MultiSet (Bag) Operations: union, intersection, difference, and count.

A MultiSet allows duplicate elements. This implementation uses Map<T, int.

Constructors

MultiSet([Iterable<T>? items])

Properties

hashCode int
The hash code for this object.
no setterinherited
length int
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(T value, [int count = 1]) → void
count(T value) int
difference(MultiSet<T> other) MultiSet<T>
intersection(MultiSet<T> other) MultiSet<T>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(T value, [int count = 1]) bool
toSet() Set<T>
toString() String
A string representation of this object.
override
union(MultiSet<T> other) MultiSet<T>

Operators

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