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

Method instanceOf

basex-core/src/main/java/org/basex/query/expr/path/Test.java:144–152  ·  view source on GitHub ↗

Checks if the current test is an instance of the specified test. @param test test to be checked @return result of check

(final Test test)

Source from the content-addressed store, hash-verified

142 * @return result of check
143 */
144 public boolean instanceOf(final Test test) {
145 if(test instanceof final UnionTest ut) {
146 for(final Test t : ut.tests) {
147 if(instanceOf(t)) return true;
148 }
149 return false;
150 }
151 return test.kind == kind || test.kind == Kind.NODE;
152 }
153
154 /**
155 * Computes the intersection between two tests.

Callers 2

mergePathsMethod · 0.95
mergeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected