Java Reference
In-Depth Information
chapter
15
inner classes
and implementation
of ArrayList
T his chapter begins our discussion of the implementation of standard data
structures. One of the simplest data structures is the ArrayList that is part of
the Collections API. In Part One (specifically Figure 3.17 and Figure 4.24) we
have already seen skeletons of the implementation, so in this chapter we con-
centrate on the details of implementing the complete class, with the associated
iterators. In doing so, we make use of an interesting Java syntactic creation,
the inner class . We discuss the inner class in this chapter, rather than in Part
One (where other syntactic elements are introduced) because we view the
inner class as a Java implementation technique, rather than a core language
feature.
In this chapter, we will see
The uses and syntax of the inner class
n
An implementation of a new class called the
AbstractCollection
n
An implementation of the ArrayList class
n
 
Search WWH ::




Custom Search