pub repository
mirror.p-hatan.ircollection_helpers
0.9.1Utility functions and classes for working with collections.
This package is discontinued upstream.
Readme
Helper libraries for working with collections.
The collection_helpers package contains a number of separate libraries
with utility functions and classes that makes working with collections easier.
Using
The collection_helpers library can be imported as separate libraries, or
in totality:
import 'package:collection_helpers/equality.dart';
import 'package:collection_helpers/algorithms.dart';
import 'package:collection_helpers/wrappers.dart';
or
import 'package:collection_helpers/all.dart';
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.
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
some different sorting algorithms.
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
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add collection_helperspubspec.yaml
name: collection_helpers
version: 0.9.1
author: "Dart Team <misc@dartlang.org>"
description: Utility functions and classes for working with collections.
homepage: http://www.dartlang.org
dev_dependencies:
unittest: ">=0.9.0 <0.10.0"
environment:
sdk: ">=1.0.0 <2.0.0"
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 0.8.6 | 2013-10-24T08:20:23.790890Z | Download | 0e35f7f28f5b5fb0ea1f40dba78484bb26f1e6530b0089894b6eb7c3da005f0d |
| 0.8.7 | 2013-10-28T14:34:16.769010Z | Download | 9b0312fafd534accceadc860663392095cafd21793c783f1cd91b64413e89d03 |
| 0.8.8 | 2013-10-30T03:30:03.704690Z | Download | 2c00f7f740eda52e8c443616be97bb9a8ebd76420071e42f276b2b68f9e47e13 |
| 0.8.9 | 2013-10-31T15:16:29.006840Z | Download | 5b34fe371c96e7647fe04f5ccf675ebd2f599cc41783ef37d8aaf9efc96605fa |
| 0.8.10 | 2013-11-01T19:23:46.595840Z | Download | 8991a5c5977b118167d9cc676adf44bc94b9bd6e7ada7a7e4f1f6facb40dc9fb |
| 0.8.10+3 | 2013-11-04T16:49:48.823220Z | Download | de2c762b0e048601b5047e4043ba0f5b032500bd3a9de23def90c6a2c3a0724a |
| 0.8.10+4 | 2013-11-05T16:06:24.205090Z | Download | 9eda7ddac39cd97d6cc6b5f5f44701e564fa52bd4683af993f1bc1ffe26aad54 |
| 0.9.0 | 2013-11-06T19:32:58.010520Z | Download | 2c3081b258867deb8b04d62c8d7b944782268c57efcbe8d8274ba054d4151bfa |
| 0.9.1 | 2013-12-11T02:35:57.427590Z | Download | ab9e5e11be2c7bb8fe26645616fdd089494920bdbce368a82df07b42668b708a |
| 0.9.2 | 2013-12-20T07:55:01.809130Z | Download | 7048a9d5b191e048edaed5f8953153f66dacfea45071f4c584759df0bc025490 |
Dependencies
No direct dependencies declared.