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

Method test

basex-core/src/main/java/org/basex/query/func/fn/FnEmpty.java:27–34  ·  view source on GitHub ↗
(final QueryContext qc, final InputInfo ii, final long pos)

Source from the content-addressed store, hash-verified

25 }
26
27 @Override
28 public boolean test(final QueryContext qc, final InputInfo ii, final long pos)
29 throws QueryException {
30 final Expr input = arg(0);
31 return input.seqType().zeroOrOne() ?
32 input.item(qc, info) == Empty.VALUE :
33 input.iter(qc).next() == null;
34 }
35
36 @Override
37 protected final void simplifyArgs(final CompileContext cc) throws QueryException {

Callers 1

itemMethod · 0.95

Calls 6

seqTypeMethod · 0.95
itemMethod · 0.95
iterMethod · 0.95
zeroOrOneMethod · 0.80
nextMethod · 0.65
argMethod · 0.45

Tested by

no test coverage detected