Container (abstract data type)
In computer science, a container is a class, a data structure, or an abstract data type (ADT) whose instances are collections of other objects. In other words, they store objects in an organized way that follows specific access rules. The size of the container depends on the number of objects (elements) it contains. Underlying implementation of various container types may vary in space and time complexity, which provides flexibility in choosing the right implementation for a given scenario.
Overview
Containers can be looked at in three ways:
access, that is the way of accessing the objects of the container. In the case of arrays, access is done with the array index. In the case of stacks, access is done according to the LIFO (last in, first out) order (alternative name: FILO, first in, last out) and in the case of queues it is done according to the FIFO (first in, first out) order (alternative name: LILO, last in, last out);
storage, that is the way of storing the objects of the container;