The type Collections is an abstract superordinate class (superclass) of List, Set and Bag. Therefore, Collections cannot be generated (see Generating Collections).
There are different kinds of collections:
- List: Objects in a list have a defined sequence. Objects may appear multiple.
- Set: The objects in sets are not sorted, there is no defined sequence. Each object is contained in the set only once.
- Bag: The objects in bags are not sorted, there is no defined sequence. Objects may appear multiple.
Examples for collections are the return values of the methods mos, rmos, dos, rdos.