
6/12/141 /XX MÔN: C U TRÚC D LI UẤ Ữ Ệ GV: NGUY N XUÂN VINHỄ
COLLECTIONs FRAMEWORK
Nguy n Xuân Vinhễ
nguyenxuanvinh@hcmuaf.edu.
vn
C U TRÚC D LI UẤ Ữ Ệ
DATA STRUCTURES
[214441]

6/12/142 /XX MÔN: C U TRÚC D LI UẤ Ữ Ệ GV: NGUY N XUÂN VINHỄ
Introduction to Collections
•Acollection—sometimescalledacontainer—issimplyanobject
thatgroupsmultipleelementsintoasingleunit.
•Collectionsareusedtostore,retrieve,manipulate,and
communicateaggregatedata.
•Representdataitemsthatformanaturalgroup,suchas:
–Apokerhand(acollectionofcards)
–Amailfolder(acollectionofletters)
–Atelephonedirectory(amappingofnamestophonenumbers)

6/12/143 /XX MÔN: C U TRÚC D LI UẤ Ữ Ệ GV: NGUY N XUÂN VINHỄ
What is a Collections Framework
•Acollections frameworkisaunifiedarchitectureforrepresenting
andmanipulatingcollections.
•Allcollectionsframeworkscontainthefollowing:
–Interfaces:Theseareabstractdatatypesthatrepresent
collections
–Implementations:Thesearetheconcreteimplementationsof
thecollectioninterfaces.
–Algorithms:Thesearethemethodsthatperformuseful
computations,suchassearchingandsorting

6/12/144 /XX MÔN: C U TRÚC D LI UẤ Ữ Ệ GV: NGUY N XUÂN VINHỄ
Collections Interface

6/12/145 /XX MÔN: C U TRÚC D LI UẤ Ữ Ệ GV: NGUY N XUÂN VINHỄ
Collections Implementations

