JCF redirects here and can also stand for Jordan canonical form in Linear Algebra or Juan Carlos Ferrero, the Spanish tennis player
The Java collections framework is a coupled set of classes and interfaces that implement commonly reusable collection data structures. It was designed and developed primarily by Joshua Bloch and introduced in JDK 1.2.
Although it is a framework, it works in a manner of a library. The JCF provides both interfaces that define various collections and classes that implement them.
Collection Interface
All collections in Java are derived from the Collection interface. Collection defines the basic parts of all collections. The interface states the add() and remove() methods for adding to and removing from an interface respectively. Also required is the toArray() method, which converts the collection into a simple array of all the elements in the collection. Collection is a subinterface of Iterable, so the iterator() method is also provided. All collections have an iterator that goes through all of the elements in the collection. Additionally, Collection is a generic. Any collection can be written to store any class. For example, Collection<String> can hold strings, and the elements from the collection can be used as strings without any casting required.
See also
External links
- 'The Java Tutorials - Collections' by Josh Bloch
- 'The Collections Framework' (Sun Java SE 6 documentation)
- Generic Types
- Java Generics and Collections
- Taming Tiger: The Collections Framework
- Collections Lessons
- CollectionSpy — A profiler for Java's Collections Framework.
- Java 6 Collection Tutorial — By Jakob Jenkov, Kadafi Kamphulusa