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

Method union

basex-core/src/main/java/org/basex/query/util/ft/FTPos.java:32–38  ·  view source on GitHub ↗

Merges the specified position arrays. @param pos sorted positions

(final IntList pos)

Source from the content-addressed store, hash-verified

30 * @param pos sorted positions
31 */
32 void union(final IntList pos) {
33 final int ps = list.size(), ls = pos.size();
34 final IntSet set = new IntSet(ps + ls);
35 for(int p = 0; p < ps; p++) set.add(list.get(p));
36 for(int l = 0; l < ls; l++) set.add(pos.get(l));
37 list = new IntList(set.keys()).sort();
38 }
39
40 /**
41 * Checks if the specified position is found.

Callers

nothing calls this directly

Calls 5

addMethod · 0.95
keysMethod · 0.95
sizeMethod · 0.65
getMethod · 0.65
sortMethod · 0.45

Tested by

no test coverage detected