コード例 #1
0
ファイル: PathNode.java プロジェクト: runeengh/basex
 /**
  * Default constructor.
  *
  * @param name node name
  * @param kind node kind
  * @param parent parent node
  * @param count counter
  */
 private PathNode(final int name, final byte kind, final PathNode parent, final int count) {
   this.children = new PathNode[0];
   this.name = (short) name;
   this.kind = kind;
   this.parent = parent;
   stats = new Stats();
   stats.count = count;
 }
コード例 #2
0
ファイル: PathNode.java プロジェクト: runeengh/basex
 /**
  * Constructor, specifying an input stream.
  *
  * @param in input stream
  * @param node parent node
  * @throws IOException I/O exception
  */
 PathNode(final DataInput in, final PathNode node) throws IOException {
   name = (short) in.readNum();
   kind = (byte) in.read();
   final int count = in.readNum();
   children = new PathNode[in.readNum()];
   if (in.readDouble() == 1) {
     // "1" indicates the format introduced with Version 7.1
     stats = new Stats(in);
   } else {
     // create old format
     stats = new Stats();
     stats.count = count;
   }
   parent = node;
   for (int c = 0; c < children.length; ++c) children[c] = new PathNode(in, this);
 }