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

Method set

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

Stores an element at the specified position. @param index index of the element to replace @param element element to be stored

(final int index, final int element)

Source from the content-addressed store, hash-verified

97 * @param element element to be stored
98 */
99 public void set(final int index, final int element) {
100 if(index >= list.length) list = Arrays.copyOf(list, newCapacity(index + 1));
101 list[index] = element;
102 size = Math.max(size, index + 1);
103 }
104
105 /**
106 * Checks if the specified element is found in the list.

Callers 2

analyzeMethod · 0.95
initLenMethod · 0.95

Calls 3

copyOfMethod · 0.80
newCapacityMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected