Closed GoogleCodeExporter closed 9 years ago
Q.nAD(int) is a slightly different case than Q.nLBD(int).
The LBD ctor takes an int to indicate a fixed capacity (a specific feature of
this type).
The AD ctor takes an int to indicate an initial capacity (a pre-alloc
optimization).
I'll float the idea internally and see what people think though (I did a quick
search over the Google code base and it would be a fairly useful method).
Original comment by kak@google.com
on 14 Sep 2012 at 7:20
I know the difference, that's why I asked about naming. Static factory
constructors can be named, which is good, but not easy for API-makers obviously.
That said, personally I'd consider:
- either leaving newLinkedBlockingDeque(int) name as is and adding
newArrayDeque(int)
- or renaming first to newLinkedBlockingDequeWithFixedSize(int) and naming
second newArrayDequeWithCapacity(int).
Additionally you may consider adding newArrayDequeWithExpectedSize(int)
factory, similar to ArrayList's one.
Original comment by xaerx...@gmail.com
on 14 Sep 2012 at 9:12
Any update here? Personally, I've encountered few possible uses for the missing
static method since reporting this issue.
Original comment by xaerx...@gmail.com
on 28 Aug 2013 at 7:12
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:13
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:18
Original comment by cgdecker@google.com
on 3 Nov 2014 at 9:08
Original issue reported on code.google.com by
xaerx...@gmail.com
on 14 Sep 2012 at 3:50