コード例 #1
0
ファイル: Node.java プロジェクト: CarterFendley/sphinx4
 protected void cacheDescendantsHelper(Node n) {
   for (Node child : n.getChildNodes()) {
     if (descendants.contains(child)) {
       continue;
     }
     descendants.add(child);
     cacheDescendantsHelper(child);
   }
 }
コード例 #2
0
ファイル: Node.java プロジェクト: CarterFendley/sphinx4
 protected void cacheDescendants() {
   descendants = new HashSet<Node>();
   cacheDescendantsHelper(this);
 }