98 * be added, removed, or replaced. Calling any mutator method on the List
99 * will always cause {@code UnsupportedOperationException} to be thrown.
100 * However, if the contained elements are themselves mutable,
101 * this may cause the List's contents to appear to change.
102 * <li>They disallow {@code null} elements. Attempts to create them with
103 * {@code null} elements result in {@code NullPointerException}.
104 * <li>They are serializable if all elements are serializable.
105 * <li>The order of elements in the list is the same as the order of the
106 * provided arguments, or of the elements in the provided array.
107 * <li>They are <a href="../lang/doc-files/ValueBased.html">value-based</a>.
108 * Callers should make no assumptions about the identity of the returned instances.
109 * Factories are free to create new instances or reuse existing ones. Therefore,
110 * identity-sensitive operations on these instances (reference equality ({@code ==}),
111 * identity hash code, and synchronization) are unreliable and should be avoided.
112 * <li>They are serialized as specified on the
113 * <a href="{@docRoot}/serialized-form.html#java.util.CollSer">Serialized Form</a>
114 * page.
115 * </ul>
116 *
117 * <p>This interface is a member of the
118 * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
119 * Java Collections Framework</a>.
120 *
121 * @param <E> the type of elements in this list
122 *
123 * @author Josh Bloch
124 * @author Neal Gafter
125 * @see Collection
126 * @see Set
127 * @see ArrayList
128 * @see LinkedList
129 * @see Vector
130 * @see Arrays#asList(Object[])
131 * @see Collections#nCopies(int, Object)
132 * @see Collections#EMPTY_LIST
133 * @see AbstractList
134 * @see AbstractSequentialList
135 * @since 1.2
136 */
137
138 public interface List<E> extends Collection<E> {
|
98 * be added, removed, or replaced. Calling any mutator method on the List
99 * will always cause {@code UnsupportedOperationException} to be thrown.
100 * However, if the contained elements are themselves mutable,
101 * this may cause the List's contents to appear to change.
102 * <li>They disallow {@code null} elements. Attempts to create them with
103 * {@code null} elements result in {@code NullPointerException}.
104 * <li>They are serializable if all elements are serializable.
105 * <li>The order of elements in the list is the same as the order of the
106 * provided arguments, or of the elements in the provided array.
107 * <li>They are <a href="../lang/doc-files/ValueBased.html">value-based</a>.
108 * Callers should make no assumptions about the identity of the returned instances.
109 * Factories are free to create new instances or reuse existing ones. Therefore,
110 * identity-sensitive operations on these instances (reference equality ({@code ==}),
111 * identity hash code, and synchronization) are unreliable and should be avoided.
112 * <li>They are serialized as specified on the
113 * <a href="{@docRoot}/serialized-form.html#java.util.CollSer">Serialized Form</a>
114 * page.
115 * </ul>
116 *
117 * <p>This interface is a member of the
118 * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
119 * Java Collections Framework</a>.
120 *
121 * @param <E> the type of elements in this list
122 *
123 * @author Josh Bloch
124 * @author Neal Gafter
125 * @see Collection
126 * @see Set
127 * @see ArrayList
128 * @see LinkedList
129 * @see Vector
130 * @see Arrays#asList(Object[])
131 * @see Collections#nCopies(int, Object)
132 * @see Collections#EMPTY_LIST
133 * @see AbstractList
134 * @see AbstractSequentialList
135 * @since 1.2
136 */
137
138 public interface List<E> extends Collection<E> {
|