ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/ArrayList.java
(Generate patch)

Comparing jsr166/src/main/java/util/ArrayList.java (file contents):
Revision 1.19 by dl, Wed Apr 19 15:07:14 2006 UTC vs.
Revision 1.23 by jsr166, Sun Jan 7 07:38:27 2007 UTC

# Line 1 | Line 1
1   /*
2 < * @(#)ArrayList.java   1.56 06/03/14
2 > * %W% %E%
3   *
4 < * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
4 > * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
5   * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6   */
7  
# Line 66 | Line 66 | package java.util;
66   * should be used only to detect bugs.</i><p>
67   *
68   * This class is a member of the
69 < * <a href="{@docRoot}/../guide/collections/index.html">
69 > * <a href="{@docRoot}/../technotes/guides/collections/index.html">
70   * Java Collections Framework</a>.
71   *
72   * @author  Josh Bloch
73   * @author  Neal Gafter
74 < * @version 1.56, 03/14/06
74 > * @version %I%, %G%
75   * @see     Collection
76   * @see     List
77   * @see     LinkedList
# Line 135 | Line 135 | public class ArrayList<E> extends Abstra
135              elementData = Arrays.copyOf(elementData, size, Object[].class);
136      }
137  
138    private void initFromConcurrentlyMutating(Collection<? extends E> c) {
139        elementData = c.toArray();
140        size = elementData.length;
141        // c.toArray might (incorrectly) not return Object[] (see 6260652)
142        if (elementData.getClass() != Object[].class)
143            elementData = Arrays.copyOf(elementData, size, Object[].class);
144    }
145
146    private final static Object UNALLOCATED = new Object();
147
138      /**
139       * Trims the capacity of this <tt>ArrayList</tt> instance to be the
140       * list's current size.  An application can use this operation to minimize

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines