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

Method commonAxis

basex-core/src/main/java/org/basex/query/expr/path/Path.java:1114–1123  ·  view source on GitHub ↗

Returns the common merged axis of multiple expressions. @param exprs expressions @return common axis or null

(final Expr... exprs)

Source from the content-addressed store, hash-verified

1112 * @return common axis or {@code null}
1113 */
1114 private static Axis commonAxis(final Expr... exprs) {
1115 Axis common = null;
1116 for(final Expr ex : exprs) {
1117 if(!(ex instanceof final Path path) || path.root != null) return null;
1118 final Axis merged = mergedAxis(path.steps[0]);
1119 common = common == merged || common == null ? merged : null;
1120 if(common == null) return null;
1121 }
1122 return common;
1123 }
1124
1125 @Override
1126 public final boolean inlineable(final InlineContext ic) {

Callers 1

mergeStepMethod · 0.95

Calls 1

mergedAxisMethod · 0.95

Tested by

no test coverage detected