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

Method leaf

basex-core/src/main/java/org/basex/gui/view/ViewData.java:31–39  ·  view source on GitHub ↗

Checks if the specified node is a text node. @param opts gui options @param data data reference @param pre PRE value @return result of check

(final GUIOptions opts, final Data data, final int pre)

Source from the content-addressed store, hash-verified

29 * @return result of check
30 */
31 public static boolean leaf(final GUIOptions opts, final Data data, final int pre) {
32 final int kind = data.kind(pre);
33 if(kind == Data.ATTR) return true;
34
35 final boolean atts = opts.get(GUIOptions.MAPATTS);
36 final int last = pre + (atts ? 1 : data.attSize(pre, kind));
37 return last == data.meta.size || data.parent(pre, kind) >=
38 data.parent(last, data.kind(last));
39 }
40
41 /**
42 * Returns path for the specified PRE value.

Callers 2

drawRectanglesMethod · 0.95
keyPressedMethod · 0.95

Calls 4

attSizeMethod · 0.80
kindMethod · 0.65
getMethod · 0.65
parentMethod · 0.45

Tested by

no test coverage detected