Custom Collections

Before we close this chapter we need to look at one additional topic: Why develop custom collections in the first place? Up to this point, we've seen two custom collections. DOMArray.java is an exceptionally simple collection that helps us understand better how collections work. DOMList.java goes a step further and gives a much better understanding about the inner workings of a collection.

There are a number of reasons to develop custom collections, the most important of which follow:

  • Application Specific— Perhaps the most obvious reason for a custom collection might be application-specific collections. The previous DOM-based collections are excellent examples of application-specific collections. Certainly other application ...

Get XML Development with Java™ 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.