Update for the 2.10 dev sdk.
Pre-release for the null safety migration of this package.
Note that 1.15.0
may not be the final stable null safety release version, we reserve the right to release it as a 2.0.0
breaking change.
This release will be pinned to only allow pre-release sdk versions starting from 2.9.0-dev.18.0
, which is the first version where this package will appear in the null safety allow list.
mapMap
. The Map interface has a map
call and map literals can use for-loop elements which supersede this method.CombinedMapView.keys
, CombinedMapView.length
, CombinedMapView.forEach
, and CombinedMapView.values
to work as specified and not repeat duplicate items from the maps.length
getter now must iterate all maps in order to remove duplicates and return an accurate length, so it is no longer O(maps)
.<3.0.0
.retype
and deprecate methods.QueueList
, MapKeySet
, and MapValueSet
did not adhere to the contract laid out by List.cast
, Set.cast
and Map.cast
respectively. The returned instances of these methods now correctly forward to the existing instance instead of always creating a new copy.Delegating{Name}.typed
static methods in favor of the new Dart 2 cast
methods. For example, DelegatingList.typed<String>(list)
can now be written as list.cast<String>()
.>=2.0.0-dev.22.0
) is now supported.UnimplementedError
.Make DefaultEquality
's equals()
and hash()
methods take any Object
rather than objects of type E
. This makes const DefaultEquality<Null>()
usable as Equality<E>
for any E
, which means it can be used in a const context which expects Equality<E>
.
This makes the default arguments of various other const equality constructors work in strong mode.
EmptyUnmodifiableSet
's stubs that were introduced in 1.14.4.Iterable
, List
, Map
, Queue
, and Set
.MapKeySet.lookup
to be a valid override in strong mode.SyntheticInvocation
.Equality
implementations accept null
as argument to hash
.CombinedListView
, a view of several lists concatenated together.CombinedIterableView
, a view of several iterables concatenated together.CombinedMapView
, a view of several maps concatenated together.EqualityBy
Add CaseInsensitiveEquality
.
Fix bug in equalsIgnoreAsciiCase
.
EqualityMap
and EqualitySet
classes which use Equality
objects for key and element equality, respectively.Set.difference
now takes a Set<Object>
as argument.stronglyConnectedComponents()
function that returns the strongly connected components in a directed graph.Add a top-level mapMap()
function that works like Iterable.map()
on a Map
.
Add a top-level mergeMaps()
function that creates a new map with the combined contents of two existing maps.
Add a top-level groupBy()
function that converts an Iterable
to a Map
by grouping its elements using a function.
Add top-level minBy()
and maxBy()
functions that return the minimum and maximum values in an Iterable
, respectively, ordered by a derived value.
Add a top-level transitiveClosure()
function that returns the transitive closure of a directed graph.
const UnmodifiableSetView.empty()
constructor.Add a UnionSet
class that provides a view of the union of a set of sets.
Add a UnionSetController
class that provides a convenient way to manage the contents of a UnionSet
.
Fix another incorrectly-declared generic type.
Add DelegatingIterable.typed()
, DelegatingList.typed()
, DelegatingSet.typed()
, DelegatingMap.typed()
, and DelegatingQueue.typed()
static methods. These wrap untyped instances of these classes with the correct type parameter, and assert the types of values as they're accessed.
Fix the types for binarySearch()
and lowerBound()
so they no longer require all arguments to be comparable.
Add generic annotations to insertionSort()
and mergeSort()
.
Add a new PriorityQueue()
constructor that forwards to new HeapPriorityQueue()
.
Deprecate top-level libraries other than package:collection/collection.dart
, which exports these libraries' interfaces.
Add lowerBound
to binary search for values that might not be present.
Verify that the is valid for CanonicalMap.[]
.
Map
and Set
.UnmodifiableMapView
from the Dart core libraries.isValidKey
arguments of CanonicalizedMap
.QueueList
class that implements both Queue
and List
.CanonicalizedMap
class that canonicalizes its keys to provide a custom equality relation.Add a MapKeySet
class that exposes an unmodifiable Set
view of a Map
's keys.
Add a MapValueSet
class that takes a function from values to keys and uses it to expose a Set
view of a Map
's values.