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

Method attSize

basex-core/src/main/java/org/basex/data/Data.java:361–368  ·  view source on GitHub ↗

Returns the number of attributes plus 1. @param pre PRE value @param kind node kind @return number of attributes

(final int pre, final int kind)

Source from the content-addressed store, hash-verified

359 * @return number of attributes
360 */
361 public final int attSize(final int pre, final int kind) {
362 int s = kind == ELEM ? table.read1(pre, 0) >> 3 & IO.MAXATTS : 1;
363 // skip additional attributes if value is larger than maximum range
364 if(s == IO.MAXATTS) {
365 while(s < meta.size - pre && kind(pre + s) == ATTR) s++;
366 }
367 return s;
368 }
369
370 /**
371 * Finds the specified attribute and returns its value.

Callers 15

insertTextMethod · 0.95
insertElementMethod · 0.95
atomMethod · 0.95
attValueMethod · 0.95
updateMethod · 0.95
replaceMethod · 0.95
deleteMethod · 0.95
insertAttrMethod · 0.95
insertMethod · 0.95
nodeMethod · 0.95
compareMethod · 0.95
lazyReplaceMethod · 0.95

Calls 4

kindMethod · 0.95
read1Method · 0.45
write1Method · 0.45
minMethod · 0.45

Tested by 2

insertTextMethod · 0.76
insertElementMethod · 0.76