Container class

From Wikipedia, the free encyclopedia

In object-oriented programming, a container class is a class of objects that is intended to contain other objects. These objects are usually allowed to be of any class, and may be of container classes themselves.

Examples of container classes include

The Java Collections Framework, as well as standard C++ library provides APIs and implementations for many kinds of container classes.

[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] See also

In other languages