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

Method add

basex-core/src/main/java/org/basex/util/list/ByteList.java:39–49  ·  view source on GitHub ↗

Adds an element to the array. @param element element to be added; will be cast to a byte @return self reference

(final int element)

Source from the content-addressed store, hash-verified

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

Callers 15

writeMultipartBinaryMethod · 0.95
singleAppendMethod · 0.95
readStringMethod · 0.95
readBytesMethod · 0.95
contentMethod · 0.95
TarEntryMethod · 0.95
longNameMethod · 0.95
bytesToB64Method · 0.95
itemMethod · 0.95
toDigitsMethod · 0.95
itemMethod · 0.95
toJavaMethod · 0.95

Calls 3

copyMethod · 0.95
copyOfMethod · 0.80
newCapacityMethod · 0.45

Tested by 2

writeMultipartBinaryMethod · 0.76
singleAppendMethod · 0.76