We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 661985c commit 55ca500Copy full SHA for 55ca500
bson/src/main/org/bson/BsonArray.java
@@ -52,6 +52,18 @@ public BsonArray() {
52
this(new ArrayList<BsonValue>(), false);
53
}
54
55
+ /**
56
+ * Construct an empty BsonArray with the specified initial capacity.
57
+ *
58
+ * @param initialCapacity the initial capacity of the BsonArray
59
+ * @throws IllegalArgumentException if the specified initial capacity
60
+ * is negative
61
+ * @since 4.3
62
+ */
63
+ public BsonArray(final int initialCapacity) {
64
+ this(new ArrayList<BsonValue>(initialCapacity), false);
65
+ }
66
+
67
@SuppressWarnings("unchecked")
68
BsonArray(final List<? extends BsonValue> values, final boolean copy) {
69
if (copy) {
0 commit comments