jdk/src/share/classes/java/util/ArrayList.java
changeset 19435 9d7530ff42cb
parent 18829 ec84f0c313b0
child 22078 bdec5d53e98c
equal deleted inserted replaced
19434:83132c40a585 19435:9d7530ff42cb
  1236         if (modCount != expectedModCount) {
  1236         if (modCount != expectedModCount) {
  1237             throw new ConcurrentModificationException();
  1237             throw new ConcurrentModificationException();
  1238         }
  1238         }
  1239     }
  1239     }
  1240 
  1240 
       
  1241     /**
       
  1242      * Creates a <em><a href="Spliterator.html#binding">late-binding</a></em>
       
  1243      * and <em>fail-fast</em> {@link Spliterator} over the elements in this
       
  1244      * list.
       
  1245      *
       
  1246      * <p>The {@code Spliterator} reports {@link Spliterator#SIZED},
       
  1247      * {@link Spliterator#SUBSIZED}, and {@link Spliterator#ORDERED}.
       
  1248      * Overriding implementations should document the reporting of additional
       
  1249      * characteristic values.
       
  1250      *
       
  1251      * @return a {@code Spliterator} over the elements in this list
       
  1252      * @since 1.8
       
  1253      */
       
  1254     @Override
  1241     public Spliterator<E> spliterator() {
  1255     public Spliterator<E> spliterator() {
  1242         return new ArrayListSpliterator<>(this, 0, -1, 0);
  1256         return new ArrayListSpliterator<>(this, 0, -1, 0);
  1243     }
  1257     }
  1244 
  1258 
  1245     /** Index-based split-by-two, lazily initialized Spliterator */
  1259     /** Index-based split-by-two, lazily initialized Spliterator */