Source: https://people.cs.aau.dk/~torp/Teaching/E01/Oop/handouts/collections.pdf