站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Java 2 SDK v1.4.2, Java 2 SDK 英文文档

Annotated Outline of the Collections Framework - Java 2 SDK v1.4.2, Java 2 SDK 英文文档

Java

Annotated Outline of Collections Framework

The collections framework consists of:
  • Abstract Implementations - Partial implementations of the collection interfaces to facilitate custom implementations.
    • AbstractCollection - Skeletal implementation of a collection that is neither a set nor a list (such as a "bag" or multiset).
    • AbstractSet - Skeletal implementation of a set.
    • AbstractList - Skeletal implementation of a list backed by a random-access data store (such as an array).
    • AbstractSequentialList - Skeletal implementation of a list backed by a sequential-access data store (such as a linked list).
    • AbstractMap - Skeletal implementation of a map.
  • Algorithms
  • Infrastructure
    • Iterators - Similar to the familiar Enumeration interface, but more powerful, and with improved method names.
      • Iterator - In addition to the functionality of the Enumeration interface, allows the user to remove elements from the backing collection with well defined, useful semantics.
      • ListIterator - Iterator for use with lists. In addition to the functionality of the Iterator interface, supports bi-directional iteration, element replacement, element insertion and index retrieval.
    • Ordering
      • Comparable - Imparts a natural ordering to classes that implement it. The natural ordering may be used to sort a list or maintain order in a sorted set or map. Many classes have been retrofitted to implement this interface.
      • Comparator - Represents an order relation, which may be used to sort a list or maintain order in a sorted set or map. Can override a type's natural ordering, or order objects of a type that does not implement the Comparable interface.
    • Runtime Exceptions
      • UnsupportedOperationException - Thrown by collections if an unsupported optional operation is called.
      • ConcurrentModificationException - Thrown by iterators and list iterators if the backing collection is modified unexpectedly while the iteration is in progress. Also thrown by sublist views of lists if the backing list is modified unexpectedly.
    • Performance
      • RandomAccess - Marker interface that allows List implementations to indicate that they support fast (generally constant time) random access. This allows generic algorithms to alter their behavior to provide good performance when applied to either random or sequential access lists.
  • Array Utilities
    • Arrays - Contains static methods to sort, search, compare and fill arrays of primitives and Objects.

    Copyright © 1995-99 Sun Microsystems, Inc. All Rights Reserved.



    Please send comments to: collections-comments@java.sun.com
    Sun
    Java Software