OLD | NEW |
1 Helper libraries for working with collections. | 1 Helper libraries for working with collections. |
2 | 2 |
3 The `collection_helpers` package contains a number of separate libraries | 3 The `collection` package contains a number of separate libraries |
4 with utility functions and classes that makes working with collections easier. | 4 with utility functions and classes that makes working with collections easier. |
5 | 5 |
6 ## Using | 6 ## Using |
7 | 7 |
8 The `collection_helpers` library can be imported as separate libraries, or | 8 The `collection` package can be imported as separate libraries, or |
9 in totality: | 9 in totality: |
10 | 10 |
11 import 'package:collection_helpers/equality.dart'; | 11 import 'package:collection/equality.dart'; |
12 import 'package:collection_helpers/algorithms.dart'; | 12 import 'package:collection/algorithms.dart'; |
13 import 'package:collection_helpers/wrappers.dart'; | 13 import 'package:collection/wrappers.dart'; |
14 | 14 |
15 or | 15 or |
16 | 16 |
17 import 'package:collection_helpers/all.dart'; | 17 import 'package:collection/collection.dart'; |
18 | 18 |
19 ## Equality | 19 ## Equality |
20 | 20 |
21 The equality library gives a way to specify equality of elements and | 21 The equality library gives a way to specify equality of elements and |
22 collections. | 22 collections. |
23 | 23 |
24 Collections in Dart have no inherent equality. Two sets are not equal, even | 24 Collections in Dart have no inherent equality. Two sets are not equal, even |
25 if they contain exactly the same objects as elements. | 25 if they contain exactly the same objects as elements. |
26 | 26 |
27 The equality library provides a way to say define such an equality. In this | 27 The equality library provides a way to say define such an equality. In this |
(...skipping 18 matching lines...) Expand all Loading... |
46 ## Wrappers | 46 ## Wrappers |
47 | 47 |
48 The wrappers library contains classes that "wrap" a collection. | 48 The wrappers library contains classes that "wrap" a collection. |
49 | 49 |
50 A wrapper class contains an object of the same type, and it forwards all | 50 A wrapper class contains an object of the same type, and it forwards all |
51 methods to the wrapped object. | 51 methods to the wrapped object. |
52 | 52 |
53 Wrapper classes can be used in various ways, for example to restrict the type | 53 Wrapper classes can be used in various ways, for example to restrict the type |
54 of an object to that of a supertype, or to change the behavior of selected | 54 of an object to that of a supertype, or to change the behavior of selected |
55 functions on an existing object. | 55 functions on an existing object. |
OLD | NEW |