本文整理匯總了Java中com.google.common.collect.Multimap.containsEntry方法的典型用法代碼示例。如果您正苦於以下問題:Java Multimap.containsEntry方法的具體用法?Java Multimap.containsEntry怎麽用?Java Multimap.containsEntry使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.common.collect.Multimap
的用法示例。
在下文中一共展示了Multimap.containsEntry方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: fieldInitializedByPreviousInitializer
import com.google.common.collect.Multimap; //導入方法依賴的package包/類
/**
* @param fieldSymbol the field
* @param initTreePath TreePath to the initializer method / block
* @param state visitor state
* @return true if the field is always initialized (by some other initializer) before the
* initializer corresponding to initTreePath executes
*/
private boolean fieldInitializedByPreviousInitializer(
Symbol fieldSymbol, TreePath initTreePath, VisitorState state) {
TreePath enclosingClassPath = initTreePath.getParentPath();
ClassTree enclosingClass = (ClassTree) enclosingClassPath.getLeaf();
Multimap<Tree, Element> tree2Init = initTree2PrevFieldInit.get(enclosingClass);
if (tree2Init == null) {
tree2Init = computeTree2Init(enclosingClassPath, state);
initTree2PrevFieldInit.put(ASTHelpers.getSymbol(enclosingClass), tree2Init);
}
return tree2Init.containsEntry(initTreePath.getLeaf(), fieldSymbol);
}