Java Reference
In-Depth Information
All the concrete types that define maps have AbstractMap<K,V> as a common base class. This provides
an outline implementation of operations that apply to maps, thus simplifying the definitions of the more spe-
cialized types of maps.
I don't have the space to go into all these collection classes in detail, but to show you some examples
of how and where these can be applied, I'll describe the three generic types that you are likely to find most
useful: Vector<T> , LinkedList<T> , and HashMap<K,V> . These are representative examples of the most fre-
quently used collections. After you have worked with these, you should have little difficulty with the others.
I also explain the EnumSet<E> collection class that you have already used in more detail. Before I get into
the specifics of using these classes, I introduce the interfaces that they implement, because these define the
operations that they support and thus define the ways in which you can apply them.
Collection Interfaces
The java.util package defines eight generic collection interface types that determine the methods that you
use to work with each type of collection class. These interfaces are related in the manner shown in Figure
14-7 .
FIGURE 14-7
 
 
Search WWH ::




Custom Search