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