diff options
author | Tom Tromey <tromey@redhat.com> | 2006-09-18 21:31:46 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2006-09-18 21:31:46 +0000 |
commit | b6591f48586e483e3818ec20c50d1025bf4065d8 (patch) | |
tree | 0f1cd0f193d9547d2ceda053f5558ce5781b41f4 | |
parent | 228fc33f661314b6723b691635085ee4ff6a69b2 (diff) | |
download | classpath-b6591f48586e483e3818ec20c50d1025bf4065d8.tar.gz |
* java/util/concurrent/CopyOnWriteArrayList.java
(CopyOnWriteArrayList): New constructor.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | java/util/concurrent/CopyOnWriteArrayList.java | 14 |
2 files changed, 19 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2006-09-18 Tom Tromey <tromey@redhat.com> + + * java/util/concurrent/CopyOnWriteArrayList.java + (CopyOnWriteArrayList): New constructor. + 2006-09-03 Audrius Meskauskas <AudriusA@Bioinformatics.org> * gnu/javax/swing/text/html/parser/HTML_401F.java (defineElements): diff --git a/java/util/concurrent/CopyOnWriteArrayList.java b/java/util/concurrent/CopyOnWriteArrayList.java index d116a0edc..ec2c90cc1 100644 --- a/java/util/concurrent/CopyOnWriteArrayList.java +++ b/java/util/concurrent/CopyOnWriteArrayList.java @@ -84,6 +84,20 @@ public class CopyOnWriteArrayList<E> extends AbstractList<E> implements } /** + * Construct a new ArrayList, and initialize it with the elements in the + * supplied array. + * + * @param array + * the array used to initialize this list + * @throws NullPointerException + * if array is null + */ + public CopyOnWriteArrayList(E[] array) + { + data = array.clone(); + } + + /** * Returns the number of elements in this list. * * @return the list size |