mengdiwang / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

Lists.newCopyOnWriteArrayList (+Set) #534

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I don't know if it's purposely missing, but static builders for 
CopyOnWriteArrayList (COWAL) and CopyOnWriteArraySet (COWAS) would be welcome. 
I didn't see any mention in both open and closed bugs...

Goals:
1. well, this just to be consistent with the other standard constructors 
newArrayList and newLinkedList and avoid having to import that specific list 
where we don't need to import both Linked and ArrayList.
2. having a quick way to build COWAL and COWAS with an Iterable if it is not a 
Collection.

One question though: would the array constructor of COWAL be supported?

Original issue reported on code.google.com by ogregoire on 28 Jan 2011 at 3:58

GoogleCodeExporter commented 9 years ago
Seems reasonable.

The array constructor is an anomaly that I doubt we'd carry over.

Original comment by kevinb@google.com on 31 Jan 2011 at 9:51

GoogleCodeExporter commented 9 years ago
Huh, we even realized these were missing >3 years ago:

http://code.google.com/p/google-collections/issues/detail?id=26

Original comment by kevinb@google.com on 31 Jan 2011 at 9:52

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 13 Jul 2011 at 6:18

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 16 Jul 2011 at 8:32

GoogleCodeExporter commented 9 years ago

Original comment by wasserman.louis on 16 Oct 2011 at 10:48

GoogleCodeExporter commented 9 years ago

Original comment by fry@google.com on 10 Dec 2011 at 4:01

GoogleCodeExporter commented 9 years ago
I got the impression that these had been discussed internally; what happened?

Original comment by wasserman.louis on 23 Feb 2012 at 7:33

GoogleCodeExporter commented 9 years ago
Hmm, we did discuss this, and I had been thinking that these were part of your 
http://codereview.appspot.com/5588047/ (which seems to be closed...?), but 
they're not.  I suspect that we had decided to add no-arg and Iterable 
versions, but I'm checking on that.

Ah, I see that the review was stuck on my question about the extra <C> type 
parameter, which I also asked about internally but didn't get an answer to.  
I'll bump that thread.

Original comment by cpov...@google.com on 23 Feb 2012 at 7:49

GoogleCodeExporter commented 9 years ago
Oh, I see that you have that here: http://codereview.appspot.com/5273049/

Perhaps Charles is in the same boat as I am, where he doesn't realize that 
these reviews are being assigned to him because he doesn't get email for them?

Original comment by cpov...@google.com on 23 Feb 2012 at 7:50

GoogleCodeExporter commented 9 years ago
Yes, Kurt reminds me that we decided to add these.

Original comment by cpov...@google.com on 23 Feb 2012 at 7:52

GoogleCodeExporter commented 9 years ago
Added internally; will be mirrored out soon.

Original comment by cpov...@google.com on 23 Feb 2012 at 10:53

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:15

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:09