1 <?xml version="1.0" encoding="utf-8"?>
   2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   3     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
   4 
   5 <!--
   6  Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
   7  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   8 
   9  This code is free software; you can redistribute it and/or modify it
  10  under the terms of the GNU General Public License version 2 only, as
  11  published by the Free Software Foundation.  Oracle designates this
  12  particular file as subject to the "Classpath" exception as provided
  13  by Oracle in the LICENSE file that accompanied this code.
  14 
  15  This code is distributed in the hope that it will be useful, but WITHOUT
  16  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  17  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  18  version 2 for more details (a copy is included in the LICENSE file that
  19  accompanied this code).
  20 
  21  You should have received a copy of the GNU General Public License version
  22  2 along with this work; if not, write to the Free Software Foundation,
  23  Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  24 
  25  Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  26  or visit www.oracle.com if you need additional information or have any
  27  questions.
  28 -->
  29 
  30 <html lang="en-US" xmlns="http://www.w3.org/1999/xhtml" xml:lang=
  31 "en-US">
  32 <head>
  33 <title>Outline of the Collections Framework</title>
  34 </head>
  35 <body>
  36 <h1>Outline of the Collections Framework</h1>
  37 <!-- Body text begins here -->
  38 The collections framework consists of:
  39 <ul>
  40 <li><strong>Collection interfaces</strong> - The primary means by
  41 which collections are manipulated.
  42 <ul>
  43 <li><a href=
  44 "../Collection.html"><strong>Collection</strong></a>
  45 - A group of objects. No assumptions are made about the order of
  46 the collection (if any) or whether it can contain duplicate
  47 elements.</li>
  48 <li><a href=
  49 "../Set.html"><strong>Set</strong></a> - The
  50 familiar set abstraction. No duplicate elements permitted. May or
  51 may not be ordered. Extends the <tt>Collection</tt> interface.</li>
  52 <li><a href=
  53 "../List.html"><strong>List</strong></a> -
  54 Ordered collection, also known as a <i>sequence</i>. Duplicates are
  55 generally permitted. Allows positional access. Extends the
  56 <tt>Collection</tt> interface.</li>
  57 <li><a href=
  58 "../Queue.html"><strong>Queue</strong></a> - A
  59 collection designed for holding elements before processing. Besides
  60 basic <tt>Collection</tt> operations, queues provide additional
  61 insertion, extraction, and inspection operations.</li>
  62 <li><a href=
  63 "../Deque.html"><strong>Deque</strong></a> - A
  64 <em>double ended queue</em>, supporting element insertion and
  65 removal at both ends. Extends the <tt>Queue</tt> interface.</li>
  66 <li><a href=
  67 "../Map.html"><strong>Map</strong></a> - A
  68 mapping from keys to values. Each key can map to one value.</li>
  69 <li><a href=
  70 "../SortedSet.html"><strong>SortedSet</strong></a>
  71 - A set whose elements are automatically sorted, either in their
  72 <i>natural ordering</i> (see the <a href=
  73 "../../lang/Comparable.html"><tt>Comparable</tt></a>
  74 interface) or by a <a href=
  75 "../Comparator.html"><tt>Comparator</tt></a>
  76 object provided when a <tt>SortedSet</tt> instance is created.
  77 Extends the <tt>Set</tt> interface.</li>
  78 <li><a href=
  79 "../SortedMap.html"><strong>SortedMap</strong></a>
  80 - A map whose mappings are automatically sorted by key, either
  81 using the <i>natural ordering</i> of the keys or by a comparator
  82 provided when a <tt>SortedMap</tt> instance is created. Extends the
  83 <tt>Map</tt> interface.</li>
  84 <li><a href=
  85 "../NavigableSet.html"><strong>NavigableSet</strong></a>
  86 - A <tt>SortedSet</tt> extended with navigation methods reporting
  87 closest matches for given search targets. A <tt>NavigableSet</tt>
  88 may be accessed and traversed in either ascending or descending
  89 order.</li>
  90 <li><a href=
  91 "../NavigableMap.html"><strong>NavigableMap</strong></a>
  92 - A <tt>SortedMap</tt> extended with navigation methods returning
  93 the closest matches for given search targets. A
  94 <tt>NavigableMap</tt> can be accessed and traversed in either
  95 ascending or descending key order.</li>
  96 <li><a href=
  97 "../concurrent/BlockingQueue.html"><strong>BlockingQueue</strong></a>
  98 - A <tt>Queue</tt> with operations that wait for the queue to
  99 become nonempty when retrieving an element and that wait for space
 100 to become available in the queue when storing an element. (This
 101 interface is part of the <tt><a href=
 102 "../concurrent/package-summary.html">java.util.concurrent</a></tt>
 103 package.)</li>
 104 <li><a href=
 105 "../concurrent/TransferQueue.html"><strong>TransferQueue</strong></a>
 106 - A <tt>BlockingQueue</tt> in which producers can wait for
 107 consumers to receive elements. (This interface is part of the
 108 <tt><a href=
 109 "../concurrent/package-summary.html">java.util.concurrent</a></tt>
 110 package.)</li>
 111 <li><a href=
 112 "../concurrent/BlockingDeque.html"><strong>BlockingDeque</strong></a>
 113 - A <tt>Deque</tt> with operations that wait for the deque to
 114 become nonempty when retrieving an element and wait for space to
 115 become available in the deque when storing an element. Extends both
 116 the <tt>Deque</tt> and <tt>BlockingQueue</tt> interfaces. (This
 117 interface is part of the <tt><a href=
 118 "../concurrent/package-summary.html">java.util.concurrent</a></tt>
 119 package.)</li>
 120 <li><a href=
 121 "../concurrent/ConcurrentMap.html"><strong>ConcurrentMap</strong></a>
 122 - A <tt>Map</tt> with atomic <tt>putIfAbsent</tt>, <tt>remove</tt>,
 123 and <tt>replace</tt> methods. (This interface is part of the
 124 <tt>java.util.concurrent</tt> package.)</li>
 125 <li><a href=
 126 "../concurrent/ConcurrentNavigableMap.html"><strong>
 127 ConcurrentNavigableMap</strong></a> - A <tt>ConcurrentMap</tt> that
 128 is also a <tt>NavigableMap</tt>.</li>
 129 </ul>
 130 </li>
 131 <li><strong>General-purpose implementations</strong> - The primary
 132 implementations of the collection interfaces.
 133 <ul>
 134 <li><strong><a href=
 135 "../HashSet.html">HashSet</a></strong> - Hash
 136 table implementation of the <tt>Set</tt> interface. The best
 137 all-around implementation of the <tt>Set</tt> interface.</li>
 138 <li><a href=
 139 "../TreeSet.html"><strong>TreeSet</strong></a>
 140 - Red-black tree implementation of the <tt>NavigableSet</tt>
 141 interface.</li>
 142 <li><strong><a href=
 143 "../LinkedHashSet.html">LinkedHashSet</a></strong>
 144 - Hash table and linked list implementation of the <tt>Set</tt>
 145 interface. An insertion-ordered <tt>Set</tt> implementation that
 146 runs nearly as fast as <tt>HashSet</tt>.</li>
 147 <li><strong><a href=
 148 "../ArrayList.html">ArrayList</a></strong> -
 149 Resizable array implementation of the <tt>List</tt> interface (an
 150 unsynchronized <tt>Vector</tt>). The best all-around implementation
 151 of the <tt>List</tt> interface.</li>
 152 <li><strong><a href=
 153 "../ArrayDeque.html">ArrayDeque</a></strong> -
 154 Efficient, resizable array implementation of the <tt>Deque</tt>
 155 interface.</li>
 156 <li><a href=
 157 "../LinkedList.html"><strong>LinkedList</strong></a>
 158 - Doubly-linked list implementation of the <tt>List</tt> interface.
 159 Provides better performance than the <tt>ArrayList</tt>
 160 implementation if elements are frequently inserted or deleted
 161 within the list. Also implements the <tt>Deque</tt> interface. When
 162 accessed through the <tt>Queue</tt> interface, <tt>LinkedList</tt>
 163 acts as a FIFO queue.</li>
 164 <li><strong><a href=
 165 "../PriorityQueue.html">PriorityQueue</a></strong>
 166 - Heap implementation of an unbounded priority queue.</li>
 167 <li><strong><a href=
 168 "../HashMap.html">HashMap</a></strong> - Hash
 169 table implementation of the <tt>Map</tt> interface (an
 170 unsynchronized <tt>Hashtable</tt> that supports <tt>null</tt> keys
 171 and values). The best all-around implementation of the <tt>Map</tt>
 172 interface.</li>
 173 <li><a href=
 174 "../TreeMap.html"><strong>TreeMap</strong></a>
 175 Red-black tree implementation of the <tt>NavigableMap</tt>
 176 interface.</li>
 177 <li><strong><a href=
 178 "../LinkedHashMap.html">LinkedHashMap</a></strong>
 179 - Hash table and linked list implementation of the <tt>Map</tt>
 180 interface. An insertion-ordered <tt>Map</tt> implementation that
 181 runs nearly as fast as <tt>HashMap</tt>. Also useful for building
 182 caches (see <a href=
 183 "../LinkedHashMap.html#removeEldestEntry-java.util.Map.Entry-">
 184 removeEldestEntry(Map.Entry)</a> ).</li>
 185 </ul>
 186 </li>
 187 <li><strong>Wrapper implementations</strong> -
 188 Functionality-enhancing implementations for use with other
 189 implementations. Accessed solely through static factory methods.
 190 <ul>
 191 <li><a href=
 192 "../Collections.html#unmodifiableCollection-java.util.Collection-">
 193 <strong>Collections.unmodifiable<i>Interface</i></strong></a> -
 194 Returns an unmodifiable view of a specified collection that throws
 195 an <tt>UnsupportedOperationException</tt> if the user attempts to
 196 modify it.</li>
 197 <li><a name="synchWrappers" href=
 198 "../Collections.html#synchronizedCollection-java.util.Collection-"
 199 id=
 200 "synchWrappers"><strong>Collections.synchronized<i>Interface</i></strong></a>
 201 - Returns a synchronized collection that is backed by the specified
 202 (typically unsynchronized) collection. As long as all accesses to
 203 the backing collection are through the returned collection, thread
 204 safety is guaranteed.</li>
 205 <li><a href=
 206 "../Collections.html#checkedCollection-java.util.Collection-java.lang.Class-">
 207 <strong>Collections.checked<i>Interface</i></strong></a> - Returns
 208 a dynamically type-safe view of the specified collection, which
 209 throws a <tt>ClassCastException</tt> if a client attempts to add an
 210 element of the wrong type. The generics mechanism in the language
 211 provides compile-time (static) type checking, but it is possible to
 212 bypass this mechanism. Dynamically type-safe views eliminate this
 213 possibility.</li>
 214 </ul>
 215 </li>
 216 <li><strong>Adapter implementations</strong> - Implementations that
 217 adapt one collections interface to another:
 218 <ul>
 219 <li><strong><a href=
 220 "../Collections.html#newSetFromMap-java.util.Map-">
 221 newSetFromMap(Map)</a></strong> - Creates a general-purpose
 222 <tt>Set</tt> implementation from a general-purpose <tt>Map</tt>
 223 implementation.</li>
 224 <li><strong><a href=
 225 "../Collections.html#asLifoQueue-java.util.Deque-">
 226 asLifoQueue(Deque)</a></strong> - Returns a view of a
 227 <tt>Deque</tt> as a Last In First Out (LIFO) <tt>Queue</tt>.</li>
 228 </ul>
 229 </li>
 230 <li><strong>Convenience implementations</strong> - High-performance
 231 "mini-implementations" of the collection interfaces.
 232 <ul>
 233 <li><a href=
 234 "../Arrays.html#asList-T...-"><strong>Arrays.asList</strong></a>
 235 - Enables an array to be viewed as a list.</li>
 236 <li><strong><a href=
 237 "../Collections.html#emptySet--">emptySet</a>,
 238 <a href=
 239 "../Collections.html#emptyList--">emptyList</a>
 240 and <a href=
 241 "../Collections.html#emptyMap--">emptyMap</a></strong>
 242 - Return an immutable empty set, list, or map.</li>
 243 <li><strong><a href=
 244 "../Collections.html#singleton-java.lang.Object-">
 245 singleton</a>, <a href=
 246 "../Collections.html#singletonList-java.lang.Object-">
 247 singletonList</a>, and <a href=
 248 "../Collections.html#singletonMap-K-V-">singletonMap</a></strong>
 249 - Return an immutable singleton set, list, or map, containing only
 250 the specified object (or key-value mapping).</li>
 251 <li><a href=
 252 "../Collections.html#nCopies-int-T-"><strong>
 253 nCopies</strong></a> - Returns an immutable list consisting of n
 254 copies of a specified object.</li>
 255 </ul>
 256 </li>
 257 <li><strong>Legacy implementations</strong> - Older collection
 258 classes were retrofitted to implement the collection interfaces.
 259 <ul>
 260 <li><a href=
 261 "../Vector.html"><strong>Vector</strong></a> -
 262 Synchronized resizable array implementation of the <tt>List</tt>
 263 interface with additional legacy methods.</li>
 264 <li><a href=
 265 "../Hashtable.html"><strong>Hashtable</strong></a>
 266 - Synchronized hash table implementation of the <tt>Map</tt>
 267 interface that does not allow <tt>null</tt> keys or values, plus
 268 additional legacy methods.</li>
 269 </ul>
 270 </li>
 271 <li><strong>Special-purpose implementations</strong>
 272 <ul>
 273 <li><strong><a href=
 274 "../WeakHashMap.html">WeakHashMap</a></strong>
 275 - An implementation of the <tt>Map</tt> interface that stores only
 276 <a href="../../lang/ref/WeakReference.html"><i>weak
 277 references</i></a> to its keys. Storing only weak references
 278 enables key-value pairs to be garbage collected when the key is no
 279 longer referenced outside of the <tt>WeakHashMap</tt>. This class
 280 is the easiest way to use the power of weak references. It is
 281 useful for implementing registry-like data structures, where the
 282 utility of an entry vanishes when its key is no longer reachable by
 283 any thread.</li>
 284 <li><strong><a href=
 285 "../IdentityHashMap.html">IdentityHashMap</a></strong>
 286 - Identity-based <tt>Map</tt> implementation based on a hash table.
 287 This class is useful for topology-preserving object graph
 288 transformations (such as serialization or deep copying). To perform
 289 these transformations, you must maintain an identity-based "node
 290 table" that keeps track of which objects have already been seen.
 291 Identity-based maps are also used to maintain
 292 object-to-meta-information mappings in dynamic debuggers and
 293 similar systems. Finally, identity-based maps are useful in
 294 preventing "spoof attacks" resulting from intentionally perverse
 295 equals methods. (<tt>IdentityHashMap</tt> never invokes the equals
 296 method on its keys.) An added benefit of this implementation is
 297 that it is fast.</li>
 298 <li><strong><a href=
 299 "../concurrent/CopyOnWriteArrayList.html">CopyOnWriteArrayList</a></strong>
 300 - A <tt>List</tt> implementation backed by an copy-on-write array.
 301 All mutative operations (such as <tt>add</tt>, <tt>set</tt>, and
 302 <tt>remove</tt>) are implemented by making a new copy of the array.
 303 No synchronization is necessary, even during iteration, and
 304 iterators are guaranteed never to throw
 305 <tt>ConcurrentModificationException</tt>. This implementation is
 306 well-suited to maintaining event-handler lists (where change is
 307 infrequent, and traversal is frequent and potentially
 308 time-consuming).</li>
 309 <li><strong><a href=
 310 "../concurrent/CopyOnWriteArraySet.html">CopyOnWriteArraySet</a></strong>
 311 - A <tt>Set</tt> implementation backed by a copy-on-write array.
 312 This implementation is similar to <tt>CopyOnWriteArrayList</tt>.
 313 Unlike most <tt>Set</tt> implementations, the <tt>add</tt>,
 314 <tt>remove</tt>, and <tt>contains</tt> methods require time
 315 proportional to the size of the set. This implementation is well
 316 suited to maintaining event-handler lists that must prevent
 317 duplicates.</li>
 318 <li><strong><a href=
 319 "../EnumSet.html">EnumSet</a></strong> - A
 320 high-performance <tt>Set</tt> implementation backed by a bit
 321 vector. All elements of each <tt>EnumSet</tt> instance must be
 322 elements of a single enum type.</li>
 323 <li><strong><a href=
 324 "../EnumMap.html">EnumMap</a></strong> - A
 325 high-performance <tt>Map</tt> implementation backed by an array.
 326 All keys in each <tt>EnumMap</tt> instance must be elements of a
 327 single enum type.</li>
 328 </ul>
 329 </li>
 330 <li><strong>Concurrent implementations</strong> - These
 331 implementations are part of <tt>java.util.concurrent</tt>.
 332 <ul>
 333 <li><strong><a href=
 334 "../concurrent/ConcurrentLinkedQueue.html">ConcurrentLinkedQueue</a></strong>
 335 - An unbounded first in, first out (FIFO) queue based on linked
 336 nodes.</li>
 337 <li><a href=
 338 "../concurrent/LinkedBlockingQueue.html"><strong>
 339 LinkedBlockingQueue</strong></a> - An optionally bounded FIFO
 340 blocking queue backed by linked nodes.</li>
 341 <li><a href=
 342 "../concurrent/ArrayBlockingQueue.html"><strong>
 343 ArrayBlockingQueue</strong></a> - A bounded FIFO blocking queue
 344 backed by an array.</li>
 345 <li><a href=
 346 "../concurrent/PriorityBlockingQueue.html"><strong>
 347 PriorityBlockingQueue</strong></a> - An unbounded blocking priority
 348 queue backed by a priority heap.</li>
 349 <li><a href=
 350 "../concurrent/DelayQueue.html"><strong>DelayQueue</strong></a>
 351 - A time-based scheduling queue backed by a priority heap.</li>
 352 <li><a href=
 353 "../concurrent/SynchronousQueue.html"><strong>SynchronousQueue</strong></a>
 354 - A simple rendezvous mechanism that uses the
 355 <tt>BlockingQueue</tt> interface.</li>
 356 <li><a href=
 357 "../concurrent/LinkedBlockingDeque.html"><strong>
 358 LinkedBlockingDeque</strong></a> - An optionally bounded FIFO
 359 blocking deque backed by linked nodes.</li>
 360 <li><a href=
 361 "../concurrent/LinkedTransferQueue.html"><strong>
 362 LinkedTransferQueue</strong></a> - An unbounded
 363 <tt>TransferQueue</tt> backed by linked nodes.</li>
 364 <li><a href=
 365 "../concurrent/ConcurrentHashMap.html"><strong>ConcurrentHashMap</strong></a>
 366 - A highly concurrent, high-performance <tt>ConcurrentMap</tt>
 367 implementation based on a hash table. This implementation never
 368 blocks when performing retrievals and enables the client to select
 369 the concurrency level for updates. It is intended as a drop-in
 370 replacement for <tt><a href=
 371 "../Hashtable.html">Hashtable</a></tt>. In
 372 addition to implementing <tt>ConcurrentMap</tt>, it supports all of
 373 the legacy methods of <tt>Hashtable</tt>.</li>
 374 <li><a href=
 375 "../concurrent/ConcurrentSkipListSet.html"><strong>
 376 ConcurrentSkipListSet</strong></a> - Skips list implementation of
 377 the <tt>NavigableSet</tt> interface.</li>
 378 <li><a href=
 379 "../concurrent/ConcurrentSkipListMap.html"><strong>
 380 ConcurrentSkipListMap</strong></a> - Skips list implementation of
 381 the <tt>ConcurrentNavigableMap</tt> interface.</li>
 382 </ul>
 383 </li>
 384 <li><strong>Abstract implementations</strong> - Skeletal
 385 implementations of the collection interfaces to facilitate custom
 386 implementations.
 387 <ul>
 388 <li><a href=
 389 "../AbstractCollection.html"><strong>AbstractCollection</strong></a>
 390 - Skeletal <tt>Collection</tt> implementation that is neither a set
 391 nor a list (such as a "bag" or multiset).</li>
 392 <li><a href=
 393 "../AbstractSet.html"><strong>AbstractSet</strong></a>
 394 - Skeletal <tt>Set</tt> implementation.</li>
 395 <li><a href=
 396 "../AbstractList.html"><strong>AbstractList</strong></a>
 397 - Skeletal <tt>List</tt> implementation backed by a random access
 398 data store (such as an array).</li>
 399 <li><a href=
 400 "../AbstractSequentialList.html"><strong>AbstractSequentialList</strong></a>
 401 - Skeletal <tt>List</tt> implementation backed by a sequential
 402 access data store (such as a linked list).</li>
 403 <li><a href=
 404 "../AbstractQueue.html"><strong>AbstractQueue</strong></a>
 405 - Skeletal <tt>Queue</tt> implementation.</li>
 406 <li><a href=
 407 "../AbstractMap.html"><strong>AbstractMap</strong></a>
 408 - Skeletal <tt>Map</tt> implementation.</li>
 409 </ul>
 410 </li>
 411 <li><strong>Algorithms</strong> - The <a href=
 412 "../Collections.html"><strong>Collections</strong></a>
 413 class contains these useful static methods.
 414 <ul>
 415 <li><strong><a href=
 416 "../Collections.html#sort-java.util.List-">sort(List)</a></strong>
 417 - Sorts a list using a merge sort algorithm, which provides average
 418 case performance comparable to a high quality quicksort, guaranteed
 419 O(n*log n) performance (unlike quicksort), and <em>stability</em>
 420 (unlike quicksort). A stable sort is one that does not reorder
 421 equal elements.</li>
 422 <li><strong><a href=
 423 "../Collections.html#binarySearch-java.util.List-T-">
 424 binarySearch(List, Object)</a></strong> - Searches for an element
 425 in an ordered list using the binary search algorithm.</li>
 426 <li><strong><a href=
 427 "../Collections.html#reverse-java.util.List-">reverse(List)</a></strong>
 428 - Reverses the order of the elements in a list.</li>
 429 <li><strong><a href=
 430 "../Collections.html#shuffle-java.util.List-">shuffle(List)</a></strong>
 431 - Randomly changes the order of the elements in a list.</li>
 432 <li><strong><a href=
 433 "../Collections.html#fill-java.util.List-T-">
 434 fill(List, Object)</a></strong> - Overwrites every element in a
 435 list with the specified value.</li>
 436 <li><strong><a href=
 437 "../Collections.html#copy-java.util.List-java.util.List-">
 438 copy(List dest, List src)</a></strong> - Copies the source list
 439 into the destination list.</li>
 440 <li><strong><a href=
 441 "../Collections.html#min-java.util.Collection-">
 442 min(Collection)</a></strong> - Returns the minimum element in a
 443 collection.</li>
 444 <li><strong><a href=
 445 "../Collections.html#max-java.util.Collection-">
 446 max(Collection)</a></strong> - Returns the maximum element in a
 447 collection.</li>
 448 <li><strong><a href=
 449 "../Collections.html#rotate-java.util.List-int-">
 450 rotate(List list, int distance)</a></strong> - Rotates all of the
 451 elements in the list by the specified distance.</li>
 452 <li><strong><a href=
 453 "../Collections.html#replaceAll-java.util.List-T-T-">
 454 replaceAll(List list, Object oldVal, Object newVal)</a></strong> -
 455 Replaces all occurrences of one specified value with another.</li>
 456 <li><strong><a href=
 457 "../Collections.html#indexOfSubList-java.util.List-java.util.List-">
 458 indexOfSubList(List source, List target)</a></strong> - Returns the
 459 index of the first sublist of source that is equal to target.</li>
 460 <li><strong><a href=
 461 "../Collections.html#lastIndexOfSubList-java.util.List-java.util.List-">
 462 lastIndexOfSubList(List source, List target)</a></strong> - Returns
 463 the index of the last sublist of source that is equal to
 464 target.</li>
 465 <li><strong><a href=
 466 "../Collections.html#swap-java.util.List-int-int-">
 467 swap(List, int, int)</a></strong> - Swaps the elements at the
 468 specified positions in the specified list.</li>
 469 <li><strong><a href=
 470 "../Collections.html#frequency-java.util.Collection-java.lang.Object-">
 471 frequency(Collection, Object)</a></strong> - Counts the number of
 472 times the specified element occurs in the specified
 473 collection.</li>
 474 <li><strong><a href=
 475 "../Collections.html#disjoint-java.util.Collection-java.util.Collection-">
 476 disjoint(Collection, Collection)</a></strong> - Determines whether
 477 two collections are disjoint, in other words, whether they contain
 478 no elements in common.</li>
 479 <li><strong><a href=
 480 "../Collections.html#addAll-java.util.Collection-T...-">
 481 addAll(Collection&lt;? super T&gt;, T...)</a></strong> - Adds all
 482 of the elements in the specified array to the specified
 483 collection.</li>
 484 </ul>
 485 </li>
 486 <li><strong>Infrastructure</strong>
 487 <ul>
 488 <li><strong>Iterators</strong> - Similar to the familiar <a href=
 489 "../Enumeration.html">Enumeration</a>
 490 interface, but more powerful, and with improved method names.
 491 <ul>
 492 <li><a href=
 493 "../Iterator.html"><strong>Iterator</strong></a>
 494 - In addition to the functionality of the <tt>Enumeration</tt>
 495 interface, enables the user to remove elements from the backing
 496 collection with well-defined, useful semantics.</li>
 497 <li><a href=
 498 "../ListIterator.html"><strong>ListIterator</strong></a>
 499 - Iterator for use with lists. In addition to the functionality of
 500 the <tt>Iterator</tt> interface, supports bidirectional iteration,
 501 element replacement, element insertion, and index retrieval.</li>
 502 </ul>
 503 </li>
 504 <li><strong>Ordering</strong>
 505 <ul>
 506 <li><a href=
 507 "../../lang/Comparable.html"><strong>Comparable</strong></a>
 508 - Imparts a <i>natural ordering</i> to classes that implement it.
 509 The natural ordering can be used to sort a list or maintain order
 510 in a sorted set or map. Many classes were retrofitted to implement
 511 this interface.</li>
 512 <li><a href=
 513 "../Comparator.html"><strong>Comparator</strong></a>
 514 - Represents an order relation, which can be used to sort a list or
 515 maintain order in a sorted set or map. Can override a type's
 516 natural ordering or order objects of a type that does not implement
 517 the <tt>Comparable</tt> interface.</li>
 518 </ul>
 519 </li>
 520 <li><strong>Runtime exceptions</strong>
 521 <ul>
 522 <li><a href=
 523 "../../lang/UnsupportedOperationException.html"><strong>
 524 UnsupportedOperationException</strong></a> - Thrown by collections
 525 if an unsupported optional operation is called.</li>
 526 <li><a href=
 527 "../ConcurrentModificationException.html"><strong>
 528 ConcurrentModificationException</strong></a> - Thrown by iterators
 529 and list iterators if the backing collection is changed
 530 unexpectedly while the iteration is in progress. Also thrown by
 531 <i>sublist</i> views of lists if the backing list is changed
 532 unexpectedly.</li>
 533 </ul>
 534 </li>
 535 <li><strong>Performance</strong>
 536 <ul>
 537 <li><strong><a href=
 538 "../RandomAccess.html">RandomAccess</a></strong>
 539 - Marker interface that lets <tt>List</tt> implementations indicate
 540 that they support fast (generally constant time) random access.
 541 This lets generic algorithms change their behavior to provide good
 542 performance when applied to either random or sequential access
 543 lists.</li>
 544 </ul>
 545 </li>
 546 </ul>
 547 </li>
 548 <li><strong>Array Utilities</strong>
 549 <ul>
 550 <li><a href=
 551 "../Arrays.html"><strong>Arrays</strong></a> -
 552 Contains static methods to sort, search, compare, hash, copy,
 553 resize, convert to <tt>String</tt>, and fill arrays of primitives
 554 and objects.</li>
 555 </ul>
 556 </li>
 557 </ul>
 558 <!-- Body text ends here -->
 559 </body>
 560 </html>