本文整理汇总了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);
}