Saturday, August 6, 2011

Java Collection Framework

Java Collection Framework
The Collection Framework is a unified architecture for representing and manipulating collections, allowing them to be manipulated independently of the details of their representation. It reduces software programming effort while increasing performance. It allows for interoperability among unrelated APIs, reduces effort in designing and learning new APIs, and fosters software reuse. The framework is based on fourteen collection interfaces. It includes implementations of these interfaces, and algorithms to manipulate them.

Collected many variables with the same type in an array is absolutely necessary in any software programming language. Therefore need to be made functions to manipulate arrays. In Java, you can take advantage of the entire Framework Collection that will act as an array of powerful functions that are available as needed.

A collection is an object that represents a collection of objects. Collection used to store, retrieve, and manipulate data. One of the simplest collection is the Array. But in The Collection Framework, Java offers a variety of other forms of Collection.

Because the Collection is an interface, then it should be made a class that implements it. In the Java API, have available some very useful class for managing objects in the Collection. Some advantages of using a collection of frameworks include:

Reduce the effort in making the program, because the already available data structures and algorithms without having to write your own.
  1. Improve performance, because each implementation can function optimally according the cases. 
  2. Easy to learn, thus reducing the effort to learn how to use the API. 
  3. Can be developed and flexible to the type of object in the Collection. 
There are many classes that implement the Collection are already available in the JDK. Basically there are three interfaces that are used, the Set, List, and Map. Then there are 5 basic implementations are also used, namely HashTable, Resizable Arrays, Balanced Tree, Linked List and Hash Table + Linked List. Each has its own advantages and disadvantages, depending on its use.

Source :
1. http://blog.haqqi.net/
2. Java 2 SE 6 Documentation (HtmlHelp version by F. Allimant)

0 comments:

Post a Comment

If you have something to say about this post, please fell free to write it in the comment form below. We will reply to all comments as soon as possible. Thanks ...