- Remove
from
constructor fromBuiltList
. - Add
of
constructors toListBuilder
andSetBuilder
.
- Test fix for new analyzer hint.
- Allow collections with nullable types, for example
BuiltList<T?>
. - Allow key/value types to be
dynamic
. This can be useful occasionally, and with Dart 2 and null safety it's much harder to usedynamic
by accident.
- Stable null safe release.
- Migrate to NNBD.
- Deps on
package:collection
andpackage:quiver
have been removed. - Multimap builders no longer have
addAll
methods that accept multimaps from quiver. But, the constructors still work with quiver multimaps.
- Add an
example
folder with some example code.
- Internal: cleanup for pedantic v1.9.0 lints.
- Add extensions methods:
List.build
,Set.build
,Map.build
,Iterable.toBuiltList
andIterable.toBuiltSet
. Requires SDK 2.6.0. - Cleanup: remove unnecessary
new
andconst
.
- Bug fix:
ListMultimapBuilder.[]
no longer ignores modifications under some circumstances.
- Bug fix:
ListBuilder
first
andlast
setters can no longer modify the underlying collection.
- Add benchmark for VM and dart2js.
- Stop doing explicit type checks on elements; in Dart 2 these are implied.
- Modify methods on
ListBuilder
andSetBuilder
that takeIterable
elements so they only iterate over the iterable once. Improves performance when the iterable are slow/lazy.
- Add return val to
SetBuilder.add()
to matchSet.add()
. - Expand
ListMultimapBuilder
: implement[]
and add return values toremove
andremoveAll
.
- Many changes following Dart 2 improvements to collections:
- Implement
Iterable
methods:cast
,followedBy
andwhereType
. - Remove obsolete
Iterable
method:retype
. - Support
orElse
insingleWhere
. - Add
BuiltList
methods:+
,indexWhere
,lastIndexWhere
. - Add
ListBuilder
setters and getters:first
,last
. - Add
BuiltMap
methods:entries
,map
. - Add
MapBuilder
methods:addEntries
,updateValue
,updateAllValues
. - Implement Dart 2 methods in internal collections used by
toList
,toMap
andtoSet
.
- Implement
- Add
from
andof
constructors toBuiltList
,BuiltMap
andBuiltSet
. Thefrom
constructors, like the current constructors, take collections of any type and check each element. Theof
constructors, like the SDKof
constructors, take a collection of the correct type. This means they can be used for type inference, allowing you to omit the explicit type. - Make
remove
,removeAt
andremoveLast
methods on builders return values like their SDK collection equivalents.
- Add length, isEmpty and isNotEmpty to ListBuilder, MapBuilder and SetBuilder
- Allow SDK 2.0.0.
- Allow quiver 2.0.0, use test version 1.
- Allow quiver 0.29.
- Implement
followedBy
onBuiltList
andBuiltSet
.
- Type fixes for DDC. Stop using a
Map
as aMap<K, V>
inMapBuilder
.
- Tweaks to tests.
- Allow quiver 0.28.
- Stop using
Function()
syntax forSet
andMap
factories. It causes problems for the analyzer when using a pre-Dart-2 SDK.
- Improve package description.
- Prepare for Dart 2; add methods that will appear in
Iterable
. - Allow quiver 0.27.
- Revert changes for Dart 2; they will be re-released as v3.0.0 as they are break libraries that provide their own implementations of built collections.
- Fix changes for Dart 2.
- Prepare for Dart 2; add methods that will appear in
Iterable
.
BuiltSet
andBuiltMap
now allow you to specify the underlying collection type. For example, you can construct aBuiltSet
using aSplayTreeSet
. This results in a set that is always in sorted order instead of preserving insertion order. Another useful possibility is to use aHashSet
, which leads to a random order but improves performance over the default. SeeSetBuilder.withBase
andMapBuilder.withBase
.
- Split collection classes into abstract interfaces and concrete, private,
implementations. This allows new implementations of the interfaces. Note that
this change is invisible unless you rely on the exact
runtimeType
of the collections.
- Fix a bug whereby
ListBuilder
andMapBuilder
allowed nulls to be introduced viamap
andexpand
.
- Allow quiver 0.26.
- The addIterable method is now generic. This allows the types of the functions passed in to be inferred.
- Add BuiltIterable interface for when you want to accept a BuiltList or BuiltSet.
- Use real generic syntax, drop comment-based syntax.
- Add operator[] to ListBuilder and MapBuilder for easier inline updates.
- Allow quiver 0.25.
- Widen parameter of BuiltSet.difference and BuiltSet.intersection to
BuiltSet<Object>
to match Set.
- Update for Set.difference change in SDK 1.21.0.
- Add
asList
,asMap
, andasSet
to the built collection classes.
- Remove runtime checks that are unnecessary if the project using
built_collection is "strong mode clean", that is, if it has no errors with
strong mode. See note in
README.md
about strong mode.
- Allow quiver 0.23.
- Strong mode clean.
- Add reference identity check to equals operators.
- Fix factories when iterable generic type is subtype of requested type.
- Add generic type information to map, fold and expand methods.
- Make map operator[] take Object instead of K, as SDK collections do.
- Fix toString for result of toList, toSet, toMap.
- Fix missing generics on some return types.
- Fix BuiltList and BuiltSet "contains" method, should take Object, not E.
- Add removeAll and retainAll methods to SetBuilder.
- Add BuiltList.toBuiltSet() and BuiltSet.toBuiltList().
- Add addIterable methods to Map and Multimap builders.
- Add BuiltSetMultimap.
- Fix "part of" statement.
- Bug fix: fix Iterable "update in place" methods of BuiltList and BuiltSet so they discard original list or set.
- Make keys and values stable for BuiltMap and BuiltMultimap.
- Make repeated builds return identical instances for BuiltList, BuiltMap, BuiltSet.
- Add 'replace' methods.
- Add BuiltListMultimap.
- Fix comments.
- Add build and rebuild methods to BuiltList, BuiltMap, BuiltSet.
- Add update methods to ListBuilder, MapBuilder, SetBuilder.
- Initial version.