MCPcopy Create free account
hub / github.com/BaseXdb/basex / initialCapacity

Method initialCapacity

basex-core/src/main/java/org/basex/util/Array.java:253–255  ·  view source on GitHub ↗

Returns an initial array capacity, which will not exceed #MAX_CAPACITY. @param size size expected result size @return capacity (#INITIAL_CAPACITY is returned if the supplied size value is negative)

(final long size)

Source from the content-addressed store, hash-verified

251 * @return capacity ({@link #INITIAL_CAPACITY} is returned if the supplied size value is negative)
252 */
253 public static int initialCapacity(final long size) {
254 return size < 0 ? INITIAL_CAPACITY : (int) Math.min(MAX_CAPACITY, size);
255 }
256
257 /**
258 * Returns a value for a new array size, which will always be larger than the old size.

Callers 15

cacheMethod · 0.95
initialCapacityMethod · 0.95
putMethod · 0.95
FTMatchMethod · 0.95
ItemListMethod · 0.95
ExprListMethod · 0.95
GNodeListMethod · 0.95
ValueListMethod · 0.95
splitMethod · 0.95
AttsMethod · 0.95
TokenBuilderMethod · 0.95
DoubleListMethod · 0.95

Calls 1

minMethod · 0.45

Tested by

no test coverage detected