StudentShare
Contact Us
Sign In / Sign Up for FREE
Search
Go to advanced search...
Free

Java Collections Framework - Essay Example

Cite this document
Summary
The paper "Java Collections Framework" is a perfect example of a report on logic and programming. According to Clifford (2008), the term ‘collection’ refers to an object that represents a group of objects…
Download full paper File format: .doc, available for editing
GRAB THE BEST PAPER93.3% of users find it useful

Extract of sample "Java Collections Framework"

JAVA COLLECTIONS FRAMEWORK Name Student ID Course Instructor Institution Date Java Collections Framework According to Cliford (2008), the term ‘collection’ refers to an object that represents a group of objects, while the term ‘collections framework’ is a unified architecture for representing and manipulating collections, allowing them to be manipulated independently of the details of their representation (Cliford, 2008). The framework enables interoperability among unrelated APIs, minimizes effort in designing and learning new APIs, and enhances software reuse. The java collections framework defines a set of interfaces and their implementations to manipulate collections, which serve as a container for a group of subjects such as a collection of mails or a set of words in a dictionary (Naftalin Maurice & Wadler Philip, 2009). These frameworks allow one to store, retrieve, and update a set of objects; it also provides an API to work with the data structures, such as lists, sets, maps, and trees. History of Java Collections Framework In the past several years, the Java programming language has gone through numerous transformations since the Java Development Kit (JDK) and various additions of packages and classes to the standard library. These transformations in Java language is governed by the Java Community Process (JCP), which suggests and stipulate changes to the Java framework using what is known as Java Specification Requests (JSR). Java Language Specification (JLS), which is controlled under JSR, is used to stipulate the changes to the language (Nell, Daniel, & Chip, 2011). Apart from the numerous transformations that Java has gone through, there are many more considerable changes that the framework of this programming language has undergone. For instance, the framework has expanded from a few hundred classes in JDK 1.0 to more than three thousand in J2SE 5 (Nell, Daniel, & Chip, 2011). In addition, completely new Application Programming Interfaces (APIs), such as Java2D and Swing, have been developed, and quite a number of the original JDK 1.0 methods and classes have since been deplored. In these early versions of the Java, the implementation of collections included some data structure classes; however, they did not have a collections framework. The grouping of Java objects was done through Hashtable and Vector classes. It was, however, difficult to extend these classes and did not implement a standard member interface (Nell, Daniel, & Chip, 2011). A number of independent frameworks were later created to address the need for reusable collection data structures. The most common of these data structures were Generic Collection Library (JGL) created by ObjectSpace and Collections package created by Doug Lea, and their main goal was consistency with the Standard Template Library (STL). The current Java Collection Framework was planned and created by Joshua Bloch. This framework makes use of a number of classes as well as the ideas from Doug Lea's Collections package, which has since become irrelevant as a result of introduction of Bloch’s framework (Naftalin Maurice & Wadler Philip, 2009). Generally, The Java Collections Framework was a significant addition in JDK 1.0; it added a lot of powerful data structures that speed up creation of most important Java applications, and from that time, the Java Collections Framework has become the recognized standard for collection handling in Java (William & Joseph, 2004). Benefits of Java Collections Framework As earlier mentioned the Java Collections Framework enables interoperability among unrelated APIs, minimizes effort in designing and learning new APIs, and enhances software reuse. The framework defines a set of interfaces and their implementations to manipulate collections, which serve as a container for a group of subjects such as a collection of mails or a set of words in a dictionary. Such a framework allows one to store, retrieve, and update a set of objects; it also provides an API to work with the data structures, such as lists, sets, maps, and trees. Some important data structures are however missing in the Java Collections Framework. For instance, the frame work does not have ‘Graphs’ among its data structures, unlike C++ language which has it. Basic Principles of Java Collections Framework Unlike C++ has about six parts, the Java Collections Framework comprises of four major parts namely the core collections interface, general purpose implementation classes, algorithms, and infrastructure code (William & Joseph, 2004). The interfaces are the abstract data types that are supported by the framework. The implementations are the concrete versions of these interfaces, while the algorithms are predefined actions that can be defined on either the interfaces or their implementations. Infrastructure code, on the other hand, facilitates collection manipulation. Each of these parts of the Java Collections Framework is discussed below. Core Collection Interfaces The core collections interface comprises of different types of collections; they represent the abstract data types that are part of the collections framework. They are interfaces and so they do not provide an implementation. The figure below shows the core collections interface for a Java platform. From the diagram, it is clear that the Java Collection Framework has six core interfaces divided into two different inheritance hierarchies: one with Map interface as the root and the other with Collection interface as the root. It is also clear from the figure that a Map is not a Collection per se, but, the Map interface does not declare techniques that return different views of a Map as a Collection object (William & Joseph, 2004). The core collection interfaces comprise of Collection, List, Set, Map, SortedSet, and SortedMap. Below are the characteristics of each of these core collections interfaces: Collection interface: this interface represents a group of objects referred to as its elements, and these elements can be accessed and manipulated via an lterator. Collection interface is the base interface of all collections, and its work is to offer a unified way to manipulate collection objects. Some of the techniques that the Collection interface declares are optional. An optional technique may or may not be executed by a general purpose implementation class (Parsons, 2012). Set Interface: This interface represents a collection that contains no duplicate elements. It models the mathematical set abstraction and it is usually used to represent sets such as processes running in a machine. The Set interface has no other methods except those inherited from the Collection. Set adds restriction that prohibits duplicate elements; it also adds a stronger contract on the behavior of the hasCode and equals operations, thus enabling Set objects to be compared meaningfully, even if their types of implementation are different (Gray, 2007). List interface: The interface represents a collection whose elements are arranged in sequence (Parsons, 2012). This interface allows duplicate elements and its user has precise control over where in the List each element is inserted. The elements can be accessed and manipulated via Listlterator. The different between an ordinary lterator and Listlterator is that the Listlterator offers the means to traverse the list backwards and forwards (Parsons, 2012). Map Interface: This interface represents an object that stores and retrieves an element or value whose within the map is determined by a key. A Map cannot contain duplicate values and a key can only map to a single value (Gray, 2007). It is important to note that a Map is not a Collection even though it offers techniques that return a Collection object that contains its elements. SortedSet interface: This interface represents a Set whose lterator will traverse it elements as per their natural sequence. The interface does prohibit duplicate elements in a set and it is used to sort the elements of a collection in ascending order. Insertions into a sorted set may take longer but recovery will takes place within a short period (Gray, 2007). SortedMap interface: This represents a Map that its elements are kept according to their natural sequence. Insertion into a SortedMap may take long period but recovery takes place within a short period. 1. General Purpose Implementation Classes The Java collection framework offers a set of general implementation classes that are used to implement the core collection interfaces. The General Purpose Implementation Classes is categorized into four: 1. Legacy Implementations - The collection classes from earlier releases, Vector and Hashtable, is retrofitted to implement the collection interfaces. 2. Wrapper Implementations - Add functionality, such as synchronization, to other implementations. 3. Convenience Implementations - High-performance "mini-implementations" of the collection interfaces. 4. Abstract Implementations - Partial implementations of the collection interfaces to facilitate custom implementations. Algorithms These are static techniques that carry out useful functions on collections, such as sorting a list. The Java collection framework offers a set of algorithms that are used to access and manipulate collections (Parsons, 2012). These algorithms are executed as static methods in the Collections class. The Collections class offers techniques to search and sort collections as well as find minimum and maximum elements or values. Infrastructure Java infrastructure comprises of interfaces that provide essential support for the collection interfaces. The Java collections framework offers a number of interfaces and classes whose purpose is to assist the user to manipulate elements, catch collection-specific exceptions, and create collection-aware classes. These interfaces and classes are referred to as infrastructure because they are used across the entire Java collections framework. The major part of the Java infrastructure is the arrays. The utility functions for arrays of primitives and reference objects. Not, strictly speaking, a part from the Collections Framework, this functionality is being added to the Java platform at the same time and relies on some of the same infrastructure (William & Joseph, 2004). References: Cliford J. Berg, 2008. Advanced Java Development for Enterprise Applications. London: Addison-Wesley. Gray Simon, 2007. Data Structures in Java: From Abstract Data Types to the Java Collections Framework. London: Addison-Wesley Pub. Goetz, Brian, 2006. Java Concurrency in Practice. London: Addison-Wesley. Nell Dale, Daniel Joyce, & Chip Weems, 2011. Object-Oriented Data Structures Using Java. Sidney: Jones & Bartlett Publishers. Naftalin Maurice & Wadler Philip, 2009. Java Generics and Collections. Texas: O'Reilly Media, Inc. Parsons David, 2012. Foundational Java: Key Elements and Practical Programming. New York: Springer. William Collins & Joseph Collins, 2004. Data Structures and the Java Collections Framework. New York: McGraw-Hill Higher Education. Read More
Cite this document
  • APA
  • MLA
  • CHICAGO
(Java Collections Framework Report Example | Topics and Well Written Essays - 1500 words, n.d.)
Java Collections Framework Report Example | Topics and Well Written Essays - 1500 words. https://studentshare.org/logic-programming/2050267-the-java-collections-framework
(Java Collections Framework Report Example | Topics and Well Written Essays - 1500 Words)
Java Collections Framework Report Example | Topics and Well Written Essays - 1500 Words. https://studentshare.org/logic-programming/2050267-the-java-collections-framework.
“Java Collections Framework Report Example | Topics and Well Written Essays - 1500 Words”. https://studentshare.org/logic-programming/2050267-the-java-collections-framework.
  • Cited: 0 times

CHECK THESE SAMPLES OF Java Collections Framework

Management of Continuous Programmer Education within the Irish Software Industry

The paper "Management of Continuous Programmer Education within the Irish Software Industry" aims to develop a framework that will enable all parties concerned (employees and employers) to benefit from the latest direction of the software industry.... ... ... ... The higher the level of education the higher salary they attract outside the company....
7 Pages (1750 words) Research Paper

Differences in Design Objectives

Comparison between C++ and java {Your Name} Difference in Design Objectives C++ and java possess differing heritages largely due to different design objectives.... On the other hand java was created initially as an interpreter for printing systems but it soon encompassed network computing.... java is provided with a wide-ranging library that supports total abstraction for the fundamental platform.... java is a statically typed OOP like C++ and both languages display a similar syntax though their syntaxes are not compatible with each other....
5 Pages (1250 words) Research Paper

The Marriage of Function and Form: Fulfillment of Subconscious Desires

This essay "The Marriage of Function and Form: Fulfillment of Subconscious Desires" discusses how design can be used to influence and direct the emotional response to products.... Design that connects to fantasies and emotions can easily elicit positive attitudes and purchase intentions.... ... ... ...
6 Pages (1500 words) Essay

Java Game Programming, any future

java has become one of the powerful languages ever created and has become one of the leading languages being utilized in the industry of Information and Technology.... Basically designed for the improvement of network programming, java has covered large areas in orthodox applications as well as distributed and embedded systems.... In a study conducted in US, it was found that more than 50 percentages of the developers prefer java in developing applications and this figure is constantly rising....
15 Pages (3750 words) Essay

Critical Difference Between Java and C#

At the same time as a java loper the earlier sentence could be explained as ‘a short description of the java language and platform' instead the words C# and the .... ET platform were replaced with words java and the java platform ( Obasanjo, 2007).... ava is another programming language basically developed by Sun Microsystems and released in 1995 as a most important element of Suns java platform.... java usages are normally compiled to byte code which can run on any java virtual machine (JVM) regardless of computer architecture....
12 Pages (3000 words) Essay

Component-Based Development in Systems Integration

ET framework.... Some of the main component based standards produced in present industrial set up includes Sun's java Platform Enterprise Edition (java EE), Corba Component Model (CCM), and also Microsoft's Distributed Component Object Model and ....
10 Pages (2500 words) Research Paper

Information Security of Java and NET

The paper "Information Security of java and NET" describes that both platforms and development environments offer their advantages and disadvantages to users as well as programmers and it remains up to the individual programmer or the company itself to select one or the other.... Security and the related configurations for both java and .... ET, the GUI can be used to adjust all security configurations much as the GUI tool supplied with java....
11 Pages (2750 words) Research Proposal

Evaluation of Software Development Packages for Mobile Applications

For instance, the Android operating system is founded on java programming and is available freely; iPhone offers the best quality features; while Blackberry has been recording higher sales.... .... ... ... The paper "Evаluаtiоn of Sоftwаre Development Расkаges fоr Mоbile Applicatiоns" is a wonderful example of a research paper on logic and programming....
17 Pages (4250 words) Research Paper
sponsored ads
We use cookies to create the best experience for you. Keep on browsing if you are OK with that, or find out how to manage cookies.
Contact Us