Java Reference
In-Depth Information
some sense or another produced from the Collection<T> interface. Some of these
are shown in Display 16.1. In this section, we give you an introduction to this Java
collection framework. The topic is too large to treat exhaustively in this topic, so
this can only be an introductory treatment.
Display 16.1
The Collection Landscape
Collection<T>
Set<T>
List<T>
AbstractCollection<T>
SortedSet<T>
AbstractSet<T>
AbstractList<T>
ArrayList<T>
Vector<T>
AbstractSequentialList<T>
TreeSet<T>
HashSet<T>
LinkedList<T>
A single line between two boxes means
the lower class or interface is derived
from ( extends ) the higher one.
Interface
T is a type parameter for the type of the
elements stored in the collection.
Abstract Class
Concrete Class
Collections are used along with iterators , which are discussed in Section 16.3.
Separating collections and iterators into two sections turns out to be a handy way of
organizing the material, but the two topics are intimately intertwined. In practice, you
normally use them together.
Before we discuss the Collection<T> interface, we need a brief detour to learn a bit
more about parameter type specifications.
 
 
Search WWH ::




Custom Search