本文整理匯總了Java中net.sf.extjwnl.data.list.PointerTargetTreeNode類的典型用法代碼示例。如果您正苦於以下問題:Java PointerTargetTreeNode類的具體用法?Java PointerTargetTreeNode怎麽用?Java PointerTargetTreeNode使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
PointerTargetTreeNode類屬於net.sf.extjwnl.data.list包,在下文中一共展示了PointerTargetTreeNode類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getSetOfSynsets
import net.sf.extjwnl.data.list.PointerTargetTreeNode; //導入依賴的package包/類
/**
* Harvest all the synsets from this {@link PointerTargetTreeNodeList}, iteratively and recursively. Each treeNode holds a synset, and a pointer to a child list
* of treeNodes.
*
* @param pointerTargetTreeList must not be null!
* @return
*/
protected Set<Synset> getSetOfSynsets(PointerTargetTreeNodeList pointerTargetTreeList) {
Set<Synset> ret = new LinkedHashSet<Synset>();
for (PointerTargetTreeNode treeNode : pointerTargetTreeList)
{
ret.add(new ExtJwnlSynset(extJwnlDictionary, treeNode.getSynset()));
if (treeNode.hasValidChildTreeList())
ret.addAll(getSetOfSynsets(treeNode.getChildTreeList()));
}
return ret;
}
示例2: printPointerTargetTree
import net.sf.extjwnl.data.list.PointerTargetTreeNode; //導入依賴的package包/類
private static void printPointerTargetTree(String lead, PointerTargetTreeNode hypTree, boolean needGloss, boolean needLex, boolean needOffset, boolean needSenseNum, boolean needSenseKeys) throws JWNLException {
printSense(lead, hypTree.getSynset(), needGloss, needLex, needOffset, needSenseNum, needSenseKeys);
if (null != hypTree.getChildTreeList()) {
for (PointerTargetTreeNode node : hypTree.getChildTreeList()) {
printPointerTargetTree(lead + "\t", node, needGloss, needLex, needOffset, needSenseNum, needSenseKeys);
}
}
}