next up previous
Next: 2.1.1 Arrays Up: 2. Object-Oriented Data Structures Previous: 2. Object-Oriented Data Structures

2.1 Sequences

The first data structures that we will discuss are the common representations for sequences of elements. A sequence is an ordered collection d0, d1, d2, ..., dn, n>=0 of data objects drawn from some base data type D. Sequence rrepresentations can be classified based on the set of operations that they support. In Java, it is convenient to describe these various sets of sequence operations as Java interfaces.

We have already used the a common representation for sequences, namely functional lists, in many of our examples of functional programming in the preceding chapter. Before we explore general representations for sequences, we need to discuss arrays, which are built-in to Java as they are nearly all other programming languages.



 

Corky Cartwright
2000-01-07