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

Method size

basex-core/src/main/java/org/basex/query/expr/List.java:176–189  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

174 }
175
176 @Override
177 public long size() throws QueryException {
178 if(offsets == null) {
179 // first call: sum up sizes
180 offsets = new long[el];
181 for(int o = 0; o < el && size != -1; o++) {
182 // cache offsets for direct access
183 offsets[o] = size;
184 final long s = iter(o).size();
185 size = s == -1 || size + s < 0 ? -1 : size + s;
186 }
187 }
188 return size;
189 }
190
191 private Iter iter(final int i) throws QueryException {
192 Iter iter = iters[i];

Callers 1

valueMethod · 0.95

Calls 2

iterMethod · 0.95
sizeMethod · 0.65

Tested by

no test coverage detected