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


Java Multimaps.unmodifiableListMultimap方法代碼示例

本文整理匯總了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);
    }
  }
}
 
開發者ID:skhalifa,項目名稱:QDrill,代碼行數:13,代碼來源:AdjacencyList.java

示例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);
}
 
開發者ID:eclipse,項目名稱:xtext-extras,代碼行數:12,代碼來源:RawResolvedFeatures.java

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

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

示例5: getListeners

import com.google.common.collect.Multimaps; //導入方法依賴的package包/類
public ListMultimap<String, Consumer<SuccessEvent>> getListeners() {
  return Multimaps.unmodifiableListMultimap(listeners);
}
 
開發者ID:Energyxxer,項目名稱:Vanilla-Injection,代碼行數:4,代碼來源:InjectionGroup.java

示例6: ContentMatchMap

import com.google.common.collect.Multimaps; //導入方法依賴的package包/類
ContentMatchMap(ListMultimap<String, ExprNode> matches)
{
    this.matches = matches != null
            ? Multimaps.unmodifiableListMultimap(matches)
            : EMPTY_MULTIMAP;
}
 
開發者ID:impl,項目名稱:yashiro,代碼行數:7,代碼來源:ContentMatchMap.java

示例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()));
}
 
開發者ID:google,項目名稱:gdata-java-client,代碼行數:17,代碼來源:UriParameterMap.java


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