本文整理汇总了Java中com.google.common.collect.Multimaps.unmodifiableListMultimap方法的典型用法代码示例。如果您正苦于以下问题:Java Multimaps.unmodifiableListMultimap方法的具体用法?Java Multimaps.unmodifiableListMultimap怎么用?Java Multimaps.unmodifiableListMultimap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.common.collect.Multimaps
的用法示例。
在下文中一共展示了Multimaps.unmodifiableListMultimap方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fix
import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
public void fix(boolean requireDirected) {
adjacencies = Multimaps.unmodifiableListMultimap(adjacencies);
allNodes = Collections.unmodifiableSet(allNodes);
if (requireDirected) {
List<List<Node>> cyclicReferences = GraphAlgos.checkDirected(this);
if (cyclicReferences.size() > 0) {
throw new IllegalArgumentException(
"A logical plan must be a valid DAG. You have cyclic references in your graph. " + cyclicReferences);
}
}
}
示例2: computeAllFeatures
import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
protected ListMultimap<String, JvmFeature> computeAllFeatures() {
JvmType rawType = getRawType();
if (!(rawType instanceof JvmDeclaredType)) {
return ArrayListMultimap.create();
}
ListMultimap<String, JvmFeature> result = ArrayListMultimap.create();
Multimap<String, AbstractResolvedOperation> processed = HashMultimap.create();
Set<String> processedFields = Sets.newHashSetWithExpectedSize(5);
computeAllFeatures((JvmDeclaredType)rawType, processed, processedFields, result, featureIndex.keySet());
return Multimaps.unmodifiableListMultimap(result);
}
示例3: getServiceClasses
import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
@Override
public ListMultimap<String, String> getServiceClasses() {
final ListMultimap<String, String> result =
ArrayListMultimap.create(super.getServiceClasses());
result.put(this.defaultProtocolName,
this.defaultProtocol.getClass().getName());
return Multimaps.unmodifiableListMultimap(result);
}
示例4: getServiceClasses
import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
/**
* Return the list of the available services.
* @return a MultiMap with the available services
*/
public ListMultimap<String, String> getServiceClasses() {
if (this.notYetLoaded) {
reload();
}
return Multimaps.unmodifiableListMultimap(this.classNames);
}
示例5: getListeners
import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
public ListMultimap<String, Consumer<SuccessEvent>> getListeners() {
return Multimaps.unmodifiableListMultimap(listeners);
}
示例6: ContentMatchMap
import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
ContentMatchMap(ListMultimap<String, ExprNode> matches)
{
this.matches = matches != null
? Multimaps.unmodifiableListMultimap(matches)
: EMPTY_MULTIMAP;
}
示例7: unmodifiableMap
import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
/**
* Returns an unmodifiable view of the specified parameter map. This method
* allows modules to provide users with "read-only" access to internal
* parameter maps. Query operations on the returned map "read through" to the
* specified map, and attempts to modify the returned map, whether direct or
* via its iterator or collection views, result in an {@code
* UnsupportedOperationException}.
*
* @param map the parameter map for which to return an unmodifiable view
* @return an unmodifiable view of the specified parameter map
* @throws NullPointerException if {@code map} is null
*/
public static UriParameterMap unmodifiableMap(UriParameterMap map) {
return new UriParameterMap(
Multimaps.unmodifiableListMultimap(map.delegate()));
}