Collection framework introduced in java
from java 2 platform . A collection is a group of objects that
represent a group of objects. Those who are familiar with C++ STL ,
it will be easy to understand for them as a beginner . But it's not
tough concept to grab for new learner.
As a java application developer one can
got some advantages with collection framework :
- Programming effort reduction by providing useful data structures and algorithm.
- Increase application performance.
- Provides interoperability between unrelated APIs
- Reduces the effort required to learn APIs
- Reduces the effort required to design and implement APIs
- Fosters software reuse
The collections framework consists of:
- Collection Interfaces
- General-purpose Implementations
- Legacy Implementations
- Special-purpose Implementations
- Concurrent Implementations
- Wrapper Implementations
- Convenience Implementations
- Abstract Implementations
- Algorithms
- Infrastructure
- Array Utilities
There are
fourteen collection
interfaces.
The most
basic interface is Collection.
These interfaces extend Collection:
Set,
List,
SortedSet,
NavigableSet,
Queue,
Deque,
BlockingQueue
and BlockingDeque.
The other collection interfaces, Map,
SortedMap,
NavigableMap,
ConcurrentMap
and ConcurrentNavigableMap
do not extend Collection,
as they represent mappings rather than true collections. However,
these interfaces contain collection-view
operations, which allow them to be manipulated as
collections. (ref:
http://docs.oracle.com/javase/6/docs/technotes/guides/collections/overview.html)
Collection Implementations
Implementations | ||||||
---|---|---|---|---|---|---|
Hash Table | Resizable Array | Balanced Tree | Linked List | Hash Table + Linked List | ||
Interfaces | Set | HashSet | TreeSet | LinkedHashSet | ||
List | ArrayList | LinkedList | ||||
Deque | ArrayDeque | LinkedList | ||||
Map | HashMap | TreeMap | LinkedHashMap |
No comments:
Post a Comment