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

Method add

basex-core/src/main/java/org/basex/util/list/IntList.java:56–66  ·  view source on GitHub ↗

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

(final int element)

Source from the content-addressed store, hash-verified

54 * @return self reference
55 */
56 public IntList add(final int element) {
57 int[] lst = list;
58 final int s = size;
59 if(s == lst.length) {
60 lst = Arrays.copyOf(lst, newCapacity());
61 list = lst;
62 }
63 lst[s] = element;
64 size = s + 1;
65 return this;
66 }
67
68 /**
69 * Adds elements to the array.

Callers 15

updateMethod · 0.95
toStringMethod · 0.95
cacheMethod · 0.95
valueMethod · 0.95
valueMethod · 0.95
getMethod · 0.95
unknownFunctionErrorMethod · 0.95
checkArityMethod · 0.95
valueMethod · 0.95
valueMethod · 0.95
valueMethod · 0.95
nextMethod · 0.95

Calls 3

copyFromStartMethod · 0.95
copyOfMethod · 0.80
newCapacityMethod · 0.45

Tested by 3

getMethod · 0.76
testMethod · 0.76
toValueMethod · 0.76