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

Method toArray

basex-core/src/main/java/org/basex/util/BitArray.java:62–67  ·  view source on GitHub ↗

The word array used to store the bits. The array is shrunk to the last word, where a bit is set. @return array of longs

()

Source from the content-addressed store, hash-verified

60 * @return array of longs
61 */
62 public long[] toArray() {
63 // find the last index of a word which is different from 0
64 int i = words.length;
65 while(--i >= 0 && words[i] == 0);
66 return Arrays.copyOf(words, ++i);
67 }
68
69 /**
70 * Returns the number of bits set to {@code true}.

Callers 15

getTrimmedWordsMethod · 0.95
mapMethod · 0.45
finishMethod · 0.45
paramSetMethod · 0.45
currentMethod · 0.45
MainOptionsClass · 0.45
checkMethod · 0.45
parseMethod · 0.45
checkMethod · 0.45
toStringMethod · 0.45
runMethod · 0.45
createComboMethod · 0.45

Calls 1

copyOfMethod · 0.80

Tested by 6

getTrimmedWordsMethod · 0.76
finishMethod · 0.36
paramSetMethod · 0.36
addCollectionMethod · 0.36
testCaseMethod · 0.36
runMethod · 0.36