(Collection|Container) Data Type (Set, Bag, Sequence)
About
A collection is a abstract data type for grouping together multiple values.
It's therefore sometime known as a container and creates a aggregation relationship
A collection is:
- an object that groups multiple elements into a single unit.
- just a grouping of some objects with the same type.
Once the data has been put in a collection, the data has been aggregated and we get aggregate data
Collections are used to store, retrieve, manipulate, and communicate aggregate data.
The inverse of a collection (ie a single element) is called a scalar.
Management
Type
Primary
An array is a collection structure that is used to implement [#abstract|abstract collection]].
Abstract
The Primary abstract data type are base on this two properties:
- ordering mater: Ie (A,B) is not the same than (B,A)
- unique: allow or not duplicate
Collection that can be seen as a set
Ordering matter | Allow duplicate | Collection Abstract Type |
---|---|---|
Set of elements | ||
false | false | Set |
false | true | Bag (multiset) |
true | true | Sequence (list) |
true | false | OrderedSet |
Set of Key/Pair elements (Properties are for the key) | ||
false | false | Map |
false | true | wiki/Multimap |
Mixed / Derived
Operations
Standard Operations on collection are defined in functional programming
Language Package
- Javascript - https://immutable-js.com/ - Immutable collection