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

Method add

basex-core/src/main/java/org/basex/util/list/ShortList.java:37–47  ·  view source on GitHub ↗

Adds an element to the array. @param element element to be added @return self reference

(final short element)

Source from the content-addressed store, hash-verified

35 * @return self reference
36 */
37 public ShortList add(final short element) {
38 short[] lst = list;
39 final int s = size;
40 if(s == lst.length) {
41 lst = Arrays.copyOf(lst, newCapacity());
42 list = lst;
43 }
44 lst[s] = element;
45 size = s + 1;
46 return this;
47 }
48
49 /**
50 * Adds elements to the array.

Callers 1

toJavaMethod · 0.95

Calls 3

copyFromStartMethod · 0.95
copyOfMethod · 0.80
newCapacityMethod · 0.45

Tested by

no test coverage detected