p-hatan/ mirror

pub repository

mirror.p-hatan.ir

collection

0.9.4

Collections and utilities functions and classes related to collections.

Download archive

Readme

Helper libraries for working with collections.

The collection package contains a number of separate libraries with utility functions and classes that makes working with collections easier.

Using

The collection package can be imported as separate libraries, or in totality:

import 'package:collection/algorithms.dart';
import 'package:collection/equality.dart';
import 'package:collection/iterable_zip.dart';
import 'package:collection/priority_queue.dart';
import 'package:collection/wrappers.dart';

or

import 'package:collection/collection.dart';

Algorithms

The algorithms library contains functions that operate on lists.

It contains ways to shuffle a List, do binary search on a sorted List, and various sorting algorithms.

Equality

The equality library gives a way to specify equality of elements and collections.

Collections in Dart have no inherent equality. Two sets are not equal, even if they contain exactly the same objects as elements.

The equality library provides a way to say define such an equality. In this case, for example, const SetEquality(const IdentityEquality()) is an equality that considers two sets equal exactly if they contain identical elements.

The library provides ways to define equalities on Iterables, Lists, Sets, and Maps, as well as combinations of these, such as:

const MapEquality(const IdentityEquality(), const ListEquality());

This equality considers maps equal if they have identical keys, and the corresponding values are lists with equal (operator==) values.

Iterable Zip

Utilities for "zipping" a list of iterables into an iterable of lists.

Priority Queue

An interface and implemention of a priority queue.

Wrappers

The wrappers library contains classes that "wrap" a collection.

A wrapper class contains an object of the same type, and it forwards all methods to the wrapped object.

Wrapper classes can be used in various ways, for example to restrict the type of an object to that of a supertype, or to change the behavior of selected functions on an existing object.

Changelog

0.9.4

  • Add a CanonicalizedMap class that canonicalizes its keys to provide a custom equality relation.

0.9.3+1

  • Fix all analyzer hints.

0.9.3

  • 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.

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add collection
pubspec.yaml
name: collection
version: 0.9.4
author: Dart Team <misc@dartlang.org>
description: Collections and utilities functions and classes related to collections.
homepage: http://www.dartlang.org
environment:
  sdk: '>=1.0.0 <2.0.0'
dev_dependencies:
  unittest: '>=0.9.0 <0.11.0'

Version history

VersionPublishedArchiveSHA-256
0.9.02013-12-19T13:09:03.461150ZDownload928e7d7b7df7b847c75a720ba518bdaa76f87be86c7079e5301a2c13be4378a9
0.9.12014-01-14T12:24:46.795110ZDownload9f4baaafa63842621e8b0016bd2807315fd87acb3871a6543d62079703167445
0.9.22014-04-29T10:10:55.882670ZDownloaddc2944c5d88818ccc97a5e200385600586d311a69a9b504ad5f40c6a59889a7f
0.9.3+12014-05-30T00:50:34.927120ZDownload54c953df51cb3d8b4209469ed0225715f415fdc5edc21a77629d080103d7b026
0.9.42014-07-01T21:23:22.766270ZDownloada76dad5a47c9651899ffd5075e9a46411d2a903b66f33df677ed1f0dd2f51762
1.0.02014-08-26T08:45:44.913710ZDownload57eca86fbdee3e1cf111087e193c34756d714117a48ed5bf15d39e1578a7f841
1.1.02014-11-03T20:40:22.549480ZDownloadfe45c86410d2be62cd2d22d8ffa65392eaf45a4a430d7a8e53dd6145dc7413fd
1.1.12015-05-07T11:15:03.599380ZDownload9ef4d59db1790737bfbddc627a5ee4622eceff282455e4c139243ed6a5411607
1.1.22015-08-26T19:22:50.115ZDownload18939a91ff1bb8fd2673edfb17bb5d3d85b5dcce2de720785463f6bebee3836c
1.1.32015-09-17T20:58:01.940ZDownloaddeaf3559abbf1c32a028ecca35ee9348334ee646bf6bb1015bf94d5a3ebf66db
1.2.02015-11-20T19:50:43.576ZDownloaddd709adcb35edba6f3347c2b436b81cc0db161095e12d45d227ff1cd5a22c715
1.3.02016-01-26T22:24:14.640ZDownloadbbda2fb69b105faba3a1ba73fe579aabd63b5a7061289b6ed80f4bd533d46205
1.4.02016-01-27T23:45:22.057ZDownload4ff934a8cb6d5c2c8a1739e790668a9f199c34daed28db46bde2d5f173e46ce9
1.4.12016-03-26T00:00:33.883ZDownload5c2732a3e2d02c02d8e782e3b23f9460fac4d5b9a3513d48f678366371b339c7
1.5.02016-03-29T20:28:52.634ZDownload56ae929233a705ae12771ae70cd213679c4ed1b0dd55a9471f43ba480f0280fd
1.5.12016-03-30T20:34:45.015ZDownload104964d20c2b876742f230a11742b825e0d568135b6e0566eaf0253d27be8e90
1.6.02016-05-03T17:56:02.767ZDownload4a8eb494cd577f273b6125b893e0adbf1499fd82ccb574969f930ed70743c0fe
1.7.02016-05-13T00:03:35.880ZDownload39c4880acf86136f61431ff0e67a3fc1d1c130fce012c46d0e1a6c642fdbd437
1.8.02016-05-25T21:46:44.543ZDownload730b8ca8ba6958e3e70ec80aee45c6c23a89f43fc1f50ea11cb842d4df22f7df
1.9.02016-06-23T20:53:36.699ZDownload560183d65e0c05a7914422cb47f0806070b6b1d541b8b92dd5dec7e12d429e76
1.9.12016-08-16T18:55:00.363ZDownloadf641bbec2b84ab8bfc557ba67570b0696fad01c06de900a59a368f6f3bb8e852
1.10.12016-10-31T12:08:58.118ZDownload1aeba6190470e4c79a942bbeb2b7cbc6ab386aed5bcf4122be79683806092ed8
1.11.02016-11-01T21:17:23.467ZDownloadd57c2ea8d976ed4ee56672133c6f4de690326c9a93b5f5859e8fbdaef4c27e62
1.12.02016-11-15T23:18:33.223ZDownload6b8d4ed7922b3734bacf82761eac0267c839d4647418f779c63d45c6fe6cc171
1.13.02016-12-19T22:29:47.403ZDownload396abdd82b601422f21b3020392b45f8464b89c2c407082eaf8c038ef2b8306b
1.14.02017-03-26T20:41:05.054057ZDownload15850e72d5b88ad66d5de52cd49e01e21630abd0550ca74e2652da9bd8f132f3
1.14.12017-05-22T12:53:42.873009ZDownload0fa3a96ce01761d539e2fc3e67101b6d9ef65c53ae48514cc6ae3d13a1a87e7f
1.14.22017-07-07T09:04:23.117736ZDownloadeb2ac7d5cbfab498058163d7a19762b2b03b4ecf0fa45c9504b41f9a12c8e9d7
1.14.32017-07-20T03:45:42.274200ZDownload2b84c17c5520c65b0865fb5e93a9de892953834d5d16110c55908e7913003612
1.14.42018-01-03T08:06:39.129357ZDownload9c10d8ed479609046cb2d48bf54ab1e0b4acffe8022181e07645f5d620901869
1.14.52018-01-03T08:36:23.064594ZDownload3062704557508707c73ff55b193699d4ffa646007294cfaa94727cdcc40c202f
1.14.62018-03-06T21:47:45.928622ZDownload421f00784943eca908ba850736c2ea79c53924c6ad4fac321d0a86db32601cb5
1.14.72018-03-13T00:37:42.311159ZDownload70f3191eef22a10376e90bacfb49baeedaf79e7f35ba465ab8ec2c7db9b54f3f
1.14.92018-03-20T17:15:38.196125ZDownloadb024171d8b0bf7d46dd3845e39ea91ab918b8030c74a75accdedfc991c726cd1
1.14.102018-06-12T13:40:05.041379ZDownload677c13db5028adae014a5d47c93e5a23037e76637b414b79a4f322e8da531043
1.14.112018-07-18T23:34:13.612933ZDownload0a64956a450ef9440b159c1388b47c0e46e1103f2d31b42f8358dec692de05cd
1.14.122019-08-16T17:49:49.713721ZDownloadc30fcf6c6e69422cf831c1a200badda1453fe0a78dc4a714e9b26f79e6483477
1.14.132020-06-19T17:42:17.742363ZDownload7223b6b1e0fea267664cee3fb78fa1d02f88163bb96b63b58810a3bf8ff802c1
1.15.0-nnbd2020-07-08T20:16:46.959804ZDownloadabf79c20e590c1b278c75d7ec9bd10b0223b7cc470a1ebc1a0a67411ab4be0e5
1.15.0-nullsafety2020-07-09T14:52:47.544929ZDownloaddb132baabaf6607fe54a5dd4b48fa7ce14ed9ab53639e836654eb277218caca8
1.15.0-nullsafety.12020-07-17T16:44:52.525707ZDownload2eca16b52920f338886cb2ee4030df1aeec10aec8e00cfbc2b27658e88d3875c
1.15.0-nullsafety.22020-07-22T14:23:51.075699ZDownload3d21af99beff83a5240bfee2654e0b6e026736dbdfaaec055b240e35b1f44b01
1.15.0-nullsafety.32020-09-22T20:14:44.256096ZDownloadb5b86ccb79df60cf14bad8488624f8e21e40d50d538f08decb0a469996904e0a
1.15.0-nullsafety.42020-10-23T19:59:55.082615ZDownload6432bb4eb138f5c65a3d13a9585879fa930ec1ac53ed0afd5fea9e7afea07f7b
1.15.0-nullsafety.52020-11-03T22:08:46.708370ZDownload14ca5acff3d0e9906a92e4de21e9131518e2555f7eb22e4e27197b70ad0d00e3
1.15.02021-02-01T19:52:54.965990ZDownload6d4193120997ecfd09acf0e313f13dc122b119e5eca87ef57a7d065ec9183762
1.16.02022-03-08T02:01:23.860839ZDownloadef7e3a5529178ce8f37a9d0b11cbbc8b1e025940f9cf9f76c42da6796301219d
1.17.02022-10-14T18:09:11.740964ZDownloadcfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
1.17.12023-01-26T18:05:48.833238ZDownload4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c
1.17.22023-05-12T20:59:02.286830ZDownloadf092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
1.18.02023-07-26T01:04:45.367754ZDownloadee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
1.19.02024-06-13T23:32:52.488761ZDownloada1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
1.19.12024-10-21T07:34:00.994803ZDownload2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76

Dependencies

No direct dependencies declared.