Address: http://www.runoob.com/java/java-collections.htmlJava Collection Framework
Before Java 2, Java provided the ad hoc class. For example: Dictionary, Vector, Stack, and properties These classes are used to store and manipulate groups of objects.
Although these classes are useful, they lack a central, unified theme. For this reason, the way you use the vector class differs greatly from the way you use the Properties class.
The collection framework is designed to meet several goals.
- The framework must be high-performance. The implementation of the basic set (dynamic array, linked list, tree, hash table) must also be efficient.
- The framework allows different types of collections to work in a similar way, with a high degree of interoperability.
- The expansion and adaptation of a set must be simple.
To do this, the entire collection framework is designed around a standard set of interfaces. You can use the standard implementations of these interfaces directly, such as LinkedList, HashSet, and TreeSet, and you can implement your own collections via these interfaces.
A collection framework is a unified schema used to represent and manipulate collections. All the collection frameworks include the following:
- interface: is an abstract data type that represents a collection. The interface allows the collection to manipulate the details of its representatives independently. In object-oriented languages, interfaces usually form a hierarchy.
- implementation (Class): is the specific implementation of the collection interface. Essentially, they are reusable data structures.
- algorithm: is a useful calculation for the execution of methods in an object that implements a collection interface, for example: Search and sort. These algorithms are called polymorphic, because the same approach can have different implementations on similar interfaces.
In addition to the collection, the framework also defines several map interfaces and classes. A key/value pair is stored in the map. Although maps are not collections, they are fully integrated in the collection.
Set Frame system
The Java Collection Framework provides a set of well-performing, easy-to-use interfaces and classes, and the Java Collection framework is located in the Java.util package, so a guide is required when using the collection framework.
Java Collection Framework