SLIDE 1
1
1
Java Collection: Data structure framework
2
Background
- collections store and organize objects for efficient
access
- Java collections: traditional data structures
implemented as an object-oriented framework – currently only "basic data structures sufficient for most needs" – sets, linked lists, arrays, and maps
- efficiency depends on organization and use
– linked vs. sequential allocation, and hashing vs. sorted search trees
3
Interfaces of the collections framework
4
Collection architecture
- the collections library utilizes heavily inheritance
and polymorphism
- the library is implemented as a kind of (lightweight)
framework, and it enables user-defined extensions
- separation of interfaces + their implementations:
– Collection
- List implemented by ArrayList and LinkedList
- Set implemented by HashSet and