當前位置: 首頁>>代碼示例>>Java>>正文


Java PointerTargetTreeNode類代碼示例

本文整理匯總了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;
}
 
開發者ID:hltfbk,項目名稱:Excitement-TDMLEDA,代碼行數:18,代碼來源:ExtJwnlSynset.java

示例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);
        }
    }
}
 
開發者ID:extjwnl,項目名稱:extjwnl,代碼行數:9,代碼來源:ewn.java


注:本文中的net.sf.extjwnl.data.list.PointerTargetTreeNode類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。