Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Side by Side Diff: pkg/collection_helpers/README.md

Issue 54713006: Add README.md for package:collections_helpers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 Helper libraries for working with collections.
2
3 The collection_helpers package contains a number of separate libraries
Søren Gjesse 2013/11/01 10:29:52 collection_helpers in ``'s
4 with utility functions and classes that makes working with collections easier.
5
6 ## Using
7
8 The collection_helpers library can be imported as separate libraries, or
9 in totality:
10
11 import 'package:collection_helpers/equality.dart';
12 import 'package:collection_helpers/algorithms.dart';
13 import 'package:collection_helpers/wrappers.dart';
14
15 or
16
17 import 'package:collection_helpers/all.dart';
18
19 ## Equality
20
21 The equality library gives a way to specify equality of elements and
22 collections.
23
24 Collections in dart have no inherent equality. Two sets are not equal, even
Søren Gjesse 2013/11/01 10:29:52 Dart with uppercase D.
25 if they contain exactly the same objects as elements.
26
27 The equality library provides a way to say define such an equality. In this
28 case, for example, `const SetEquality(const IdentityEquality())` is an equality
29 that considers two sets equal exactly if they contain identical elements.
30
31 The library provides ways to define equalities on iterables, lists, sets, and
Søren Gjesse 2013/11/01 10:29:52 Maybe iterables -> `Iterable`s (and for lists and
32 maps, as well as combinations of these, such as:
33
34 const MapEquality(const IdentityEquality(), const ListEquality());
35
36
Søren Gjesse 2013/11/01 10:29:52 Maybe explain what this equality actually expresse
37 ## Algorithms
38
39 The algorithms library contains functions that operate on lists.
40
41 It contains ways to shuffle a list, do binary search on a sorted list, and
Søren Gjesse 2013/11/01 10:29:52 list -> `List`
42 some different sorting algorithms.
43
44
45 ## Wrappers
46
47 The wrappers library contains classes that "wrap" a collection.
48
49 A wrapper class contains an object of the same type, and it forwards all
50 methods to the wrapped object.
51
52 Wrapper classes can be used in various ways, for example to restrict the type
53 of an object to that of a supertype, or to change the behavior of selected
54 functions on an existing object.
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698