Collections Interfaces
Home ] Up ] What is It? ] Vector & Enumeration ] [ Collections Interfaces ] Algorithms ] Sets ] Maps ]

 

Collection Interface
List Interface
Iterator Interface
ListIterator Interface
ArrayList/Iterator Example
LinkedList Example
Stack Class

 

There are a number of collections framework interfaces used to manipulate collections and pass them from one method to another.

Collection: Defines properties that all collections must have.  For example, it defines a size() method to return the number of elements currently in the collection.

List: Extends Collection, and adds additional properties that define ordered lists.  For example, the ability to retrieve an element based on an index.  (A list is sometimes called a sequence.)  A List can contain duplicate elements.

Set: Extends Collection, and adds additional properties that define a set.  A set cannot contain duplicate elements.

SortedSet: Extends Set, and adds support for ordering the set in a particular sequence.

Map: Defines properties that map keys to values.  A Map cannot contain duplicate keys. (Note that a Map does not extend Collection, and so is not a true collection.)

SortedMap: Extends Map, and adds properties that support ordering of the map in ascending key order.

Iterator: Defines the properties necessary to iterate through a Collection.

ListIterator: Extends Iterator, and defines the properties necessary to iterate through a List.

 

This page was last modified on 02 October, 2007