<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
a	O
container	B-Application
is	O
a	O
class	O
or	O
a	O
data	B-General_Concept
structure	I-General_Concept
<	O
ref>Paul	O
E	O
.	O
Black	O
(	O
ed	O
.	O
</s>
<s>
)	O
,	O
entry	O
for	O
data	B-General_Concept
structure	I-General_Concept
in	O
Dictionary	B-Data_Structure
of	I-Data_Structure
Algorithms	I-Data_Structure
and	I-Data_Structure
Data	I-Data_Structure
Structures	I-Data_Structure
.	O
</s>
<s>
Accessed	O
4	O
Oct	O
2011.	O
<	O
/ref	O
>Entry	O
data	B-General_Concept
structure	I-General_Concept
in	O
the	O
Encyclopædia	O
Britannica	O
(	O
2009	O
)	O
Online	O
entry	O
Accessed	O
4	O
Oct	O
2011	O
.	O
whose	O
instances	O
are	O
collections	O
of	O
other	O
objects	O
.	O
</s>
<s>
The	O
size	O
of	O
the	O
container	B-Application
depends	O
on	O
the	O
number	O
of	O
objects	O
(	O
elements	O
)	O
it	O
contains	O
.	O
</s>
<s>
Underlying	O
(	O
inherited	O
)	O
implementations	O
of	O
various	O
container	B-Application
types	O
may	O
vary	O
in	O
size	O
,	O
complexity	O
and	O
type	O
of	O
language	O
,	O
but	O
in	O
many	O
cases	O
they	O
provide	O
flexibility	O
in	O
choosing	O
the	O
right	O
implementation	O
for	O
any	O
given	O
scenario	O
.	O
</s>
<s>
Container	B-Application
data	B-General_Concept
structures	I-General_Concept
are	O
commonly	O
used	O
in	O
many	O
types	O
of	O
programming	O
languages	O
.	O
</s>
<s>
Containers	B-Application
can	O
be	O
characterized	O
by	O
the	O
following	O
three	O
properties	O
:	O
</s>
<s>
access	O
,	O
that	O
is	O
the	O
way	O
of	O
accessing	O
the	O
objects	O
of	O
the	O
container	B-Application
.	O
</s>
<s>
In	O
the	O
case	O
of	O
arrays	B-Data_Structure
,	O
access	O
is	O
done	O
with	O
the	O
array	O
index	O
.	O
</s>
<s>
In	O
the	O
case	O
of	O
stacks	B-Application
,	O
access	O
is	O
done	O
according	O
to	O
the	O
LIFO	B-Application
(	O
last	O
in	O
,	O
first	O
out	O
)	O
order	O
and	O
in	O
the	O
case	O
of	O
queues	B-Application
it	O
is	O
done	O
according	O
to	O
the	O
FIFO	B-Operating_System
(	O
first	B-Operating_System
in	I-Operating_System
,	I-Operating_System
first	I-Operating_System
out	I-Operating_System
)	O
order	O
;	O
</s>
<s>
storage	O
,	O
that	O
is	O
the	O
way	O
of	O
storing	O
the	O
objects	O
of	O
the	O
container	B-Application
;	O
</s>
<s>
traversal	O
,	O
that	O
is	O
the	O
way	O
of	O
traversing	O
the	O
objects	O
of	O
the	O
container	B-Application
.	O
</s>
<s>
Container	B-Application
classes	O
are	O
expected	O
to	O
implement	O
CRUD-like	O
methods	O
to	O
do	O
the	O
following	O
:	O
</s>
<s>
create	O
an	O
empty	O
container	B-Application
(	O
constructor	O
)	O
;	O
</s>
<s>
insert	O
objects	O
into	O
the	O
container	B-Application
;	O
</s>
<s>
delete	O
objects	O
from	O
the	O
container	B-Application
;	O
</s>
<s>
delete	O
all	O
the	O
objects	O
in	O
the	O
container	B-Application
(	O
clear	O
)	O
;	O
</s>
<s>
access	O
the	O
objects	O
in	O
the	O
container	B-Application
;	O
</s>
<s>
access	O
the	O
number	O
of	O
objects	O
in	O
the	O
container	B-Application
(	O
count	O
)	O
.	O
</s>
<s>
Containers	B-Application
are	O
sometimes	O
implemented	O
in	O
conjunction	O
with	O
iterators	O
.	O
</s>
<s>
Containers	B-Application
may	O
be	O
classified	O
as	O
either	O
single-value	O
containers	B-Application
or	O
associative	O
containers''	O
.	O
</s>
<s>
Single-value	O
containers	B-Application
store	O
each	O
object	O
independently	O
.	O
</s>
<s>
for	B-Language
loop	I-Language
)	O
or	O
with	O
an	O
iterator	O
.	O
</s>
<s>
An	O
associative	B-Application
container	I-Application
uses	O
an	O
associative	B-Application
array	I-Application
,	O
map	O
,	O
or	O
dictionary	B-Application
,	O
composed	O
of	O
key-value	O
pairs	O
,	O
such	O
that	O
each	O
key	O
appears	O
at	O
most	O
once	O
in	O
the	O
container	B-Application
.	O
</s>
<s>
The	O
key	O
is	O
used	O
to	O
find	O
the	O
value	O
,	O
the	O
object	O
,	O
if	O
it	O
is	O
stored	O
in	O
the	O
container	B-Application
.	O
</s>
<s>
Associative	B-Application
containers	I-Application
are	O
used	O
in	O
programming	O
languages	O
as	O
class	O
templates	B-Application
.	O
</s>
<s>
Container	B-Application
abstract	O
data	O
types	O
include	O
:	O
</s>
<s>
Common	O
data	B-General_Concept
structures	I-General_Concept
used	O
to	O
implement	O
these	O
abstract	O
types	O
include	O
:	O
</s>
<s>
Widget	B-Library
toolkits	I-Library
also	O
use	O
containers	B-Application
,	O
which	O
are	O
special	O
widgets	O
to	O
group	O
other	O
widgets	O
,	O
such	O
as	O
windows	O
,	O
panels	O
.	O
</s>
<s>
Apart	O
from	O
their	O
graphical	O
properties	O
,	O
they	O
have	O
the	O
same	O
type	O
of	O
behavior	O
as	O
container	B-Application
classes	O
,	O
as	O
they	O
keep	O
a	O
list	O
of	O
their	O
child	O
widgets	O
,	O
and	O
allow	O
adding	O
,	O
removing	O
,	O
or	O
retrieving	O
widgets	O
among	O
their	O
children	O
.	O
</s>
<s>
Container	B-Application
abstractions	O
can	O
be	O
written	O
in	O
virtually	O
any	O
programming	O
language	O
,	O
regardless	O
of	O
its	O
type	O
system	O
.	O
</s>
<s>
However	O
,	O
in	O
strongly-typed	O
object-oriented	B-Language
programming	I-Language
languages	I-Language
it	O
may	O
be	O
somewhat	O
complicated	O
for	O
a	O
developer	O
to	O
write	O
reusable	O
homogeneous	O
containers	B-Application
.	O
</s>
<s>
Because	O
of	O
differences	O
in	O
element	O
types	O
this	O
results	O
in	O
a	O
tedious	O
process	O
of	O
writing	O
and	O
keeping	O
a	O
collection	O
of	O
containers	B-Application
for	O
every	O
elemental	O
type	O
.	O
</s>
<s>
integers	O
or	O
floating	O
numbers	O
)	O
are	O
inherently	O
incompatible	O
with	O
each	O
other	O
because	O
of	O
the	O
memory	O
size	O
they	O
occupy	O
and	O
their	O
semantic	O
meaning	O
and	O
therefore	O
require	O
different	O
containers	B-Application
(	O
unless	O
of	O
course	O
,	O
they	O
are	O
mutually	O
compatible	O
or	O
convertible	O
)	O
.	O
</s>
<s>
Downcasting	B-Application
;	O
</s>
<s>
However	O
,	O
this	O
approach	O
may	O
require	O
implementing	O
a	O
template	B-Application
specialization	O
which	O
is	O
reputedly	O
a	O
time-consuming	O
process	O
given	O
that	O
types	O
differ	O
in	O
their	O
methods	O
.	O
</s>
