8242327: List spec should state that unmodifiable lists implement RandomAccess

Reviewed-by: lancea
This commit is contained in:
Stuart Marks 2020-04-13 14:37:07 -07:00
parent 99a6b6b848
commit a46f4bfa95

View File

@ -104,6 +104,8 @@ import java.util.function.UnaryOperator;
* <li>They are serializable if all elements are serializable.
* <li>The order of elements in the list is the same as the order of the
* provided arguments, or of the elements in the provided array.
* <li>The lists and their {@link #subList(int, int) subList} views implement the
* {@link RandomAccess} interface.
* <li>They are <a href="../lang/doc-files/ValueBased.html">value-based</a>.
* Callers should make no assumptions about the identity of the returned instances.
* Factories are free to create new instances or reuse existing ones. Therefore,