Netencyclo, The wikipedia mirror - The biggest multilingual encyclopedia : Container (data structure)

- Container (data structure) -

Container (data structure) :

Outils :

Vous avez un site web ? Un blog ?

 Netencyclo Directory Project 




Mettre en favoris !

Add to Netvibes
Technorati reactions
rencontre

Container (data structure)

From Wikipedia, the free encyclopedia

Jump to: navigation, search

In computer science, a container is a class, a data structure, or an abstract data type (ADT) whose instances are collections of other objects. They are used to store objects in an organized way following specific access rules.

Generally, container classes are expected to implement methods to do the following:

There are two types of containers: value containers and reference containers.

Value based containers store copies of the objects. Accessing an object also returns a copy of it. Modifying an external object after it has been inserted in the container will not affect the content of the container.

Reference based containers only store pointers or references to the objects. Accessing an object returns a reference to it. Modifying an external object after it has been inserted in the container could result in modifying the content of the container (or more precisely, the object stored in the container).

Containers are sometimes implemented in conjunction with iterators.

Contents

[edit] Examples of containers

Examples of containers include

[edit] Containers in Object-Oriented programming

In object-oriented programming, a container class is any class that is capable of storing other objects. Container classes usually implement some kind of data structure, such as a list, map, set, array, or tree. A container class is usually able to store an arbitrary number of data items, i.e. the size of the collection is adjusted automatically.

[edit] Graphic Containers

Widget toolkits use special widgets also called Containers to group the other widgets together (windows, panels, ...). Apart from their graphical properties, they have the same type of behavior as container classes, as they keep a list of their child widgets, and allow to add, remove, or retrieve widgets amongst their children.

[edit] Implementations

The Java Collections Framework, as well as the standard C++ library's Standard Template Library provides APIs and implementations for many kinds of container classes.

[edit] See also

rencontre

Container (data structure) - En savoir plus

Rencontre Container (data structure) - Articles à  la une


"Je rencontre quelques peines, je rencontre beaucoup de joie, c'est parfois une question de chance, souvent une rencontre de choix."
© 2009 Netencyclo - Netencyclo Home - Terms of Service - Privacy Policy - Program Policies
Netencyclo, the Wikipedia mirror : the biggest multilingual free-content encyclopedia on the Internet. Cet article, miroir de l'article de Wikipédia est conforme aux termes de la GFDL All Wikipedia content is licensed under the GNU Free Documentation License (see details). Content on this web site is provided for informational purposes only. We accept no responsibility for any loss, injury or inconvenience sustained by any person resulting from information published on this site. We encourage you to verify any critical information with the relevant authorities.