Hubbry Logo
search
logo

Container (abstract data type)

logo
Community Hub0 Subscribers
Write something...
Be the first to start a discussion here.
Be the first to start a discussion here.
See all
Container (abstract data type)

In computer science, a container is a class or a data structure 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 (inherited) implementations of various container types may vary in size, complexity and type of language, but in many cases they provide flexibility in choosing the right implementation for any given scenario.

Container data structures are commonly used in many types of programming languages.

Containers can be characterized by the following three properties:

Container classes are expected to implement CRUD-like methods to do the following:

Containers are sometimes implemented in conjunction with iterators.

Containers may be classified as either single-value containers or associative containers.

Single-value containers store each object independently. Objects may be accessed directly, by a language loop construct (e.g. for loop) or with an iterator.

See all
User Avatar
No comments yet.