The Java Collections Framework_Part_1

The Java Collections Framework_Part_1 - Last Updated:...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Last Updated: 18/01/12 9:35 AM CSE 2011 Prof. J. Elder - 1 - Lecture 4. The Java Collections Framework Chapters 6.3-6.4 Last Updated: 18/01/12 9:35 AM CSE 2011 Prof. J. Elder - 2 - Outline Introduction to the Java Collections Framework Iterators Interfaces Abstract Classes Classes Last Updated: 18/01/12 9:35 AM CSE 2011 Prof. J. Elder - 3 - The Java Collections Framework We will consider the Java Collections Framework as a good example of how to apply the principles of object- oriented software engineering (see Lecture 1) to the design of classical data structures. Last Updated: 18/01/12 9:35 AM CSE 2011 Prof. J. Elder - 4 - The Java Collections Framework A coupled set of classes and interfaces that implement commonly reusable collection data structures . Designed and developed primarily by Joshua Bloch (currently Chief Java Architect at Google ). Last Updated: 18/01/12 9:35 AM CSE 2011 Prof. J. Elder - 5 - What is a Collection? An object that groups multiple elements into a single unit. Sometimes called a container . Last Updated: 18/01/12 9:35 AM CSE 2011 Prof. J. Elder - 6 - What is a Collection Framework? A unified architecture for representing and manipulating collections. Includes: Interfaces: A hierarchy of ADTs. Implementations Algorithms: The methods that perform useful computations, such as searching and sorting, on objects that implement collection interfaces. These algorithms are polymorphic : that is, the same method can be used on many different implementations of the appropriate collection interface. Last Updated: 18/01/12 9:35 AM CSE 2011 Prof. J. Elder - 7 - History Apart from the Java Collections Framework, the best- known examples of collections frameworks are the C++ Standard Template Library (STL) and Smalltalk's collection hierarchy. Last Updated: 18/01/12 9:35 AM CSE 2011 Prof. J. Elder - 8 - Benefits Reduces programming effort: By providing useful data structures and algorithms, the Collections Framework frees you to concentrate on the important parts of your program rather than on the low-level "plumbing" required to make it work. Increases program speed and quality: Provides high- performance, high-quality implementations of useful data structures and algorithms. Allows interoperability among unrelated APIs: APIs can interoperate seamlessly, even though they were written independently. Reduces effort to learn and to use new APIs Reduces effort to design new APIs Fosters software reuse: New data structures that conform to the standard collection interfaces are by nature reusable. Last Updated: 18/01/12 9:35 AM CSE 2011 Prof. J. Elder - 9 - Where is the Java Collections Framework?...
View Full Document

Page1 / 50

The Java Collections Framework_Part_1 - Last Updated:...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online