List of usage examples for com.google.common.collect ImmutableListMultimap copyOf
@Beta public static <K, V> ImmutableListMultimap<K, V> copyOf( Iterable<? extends Entry<? extends K, ? extends V>> entries)
From source file:org.ambraproject.rhino.content.xml.AssetNodesByDoi.java
AssetNodesByDoi(ListMultimap<Doi, Node> nodeMap) {
this.nodeMap = ImmutableListMultimap.copyOf(nodeMap);
}
From source file:com.opengamma.strata.collect.io.PropertySet.java
/** * Obtains an instance from a map allowing for multiple values for each key. * <p>/*from ww w.j ava2 s . com*/ * The returned instance may have more than one value for each key. * * @param keyValues the key-values to create the instance with * @return the property set */ public static PropertySet of(Multimap<String, String> keyValues) { ArgChecker.notNull(keyValues, "keyValues"); return new PropertySet(ImmutableListMultimap.copyOf(keyValues)); }
From source file:org.seedstack.business.internal.event.EventServiceInternal.java
@Inject EventServiceInternal(Injector injector,/*from w w w . j av a 2 s .co m*/ Multimap<Class<? extends Event>, Class<? extends EventHandler>> eventHandlerClassesByEvent) { this.injector = injector; this.eventHandlerClassesByEvent = ImmutableListMultimap.copyOf(eventHandlerClassesByEvent); }
From source file:com.flipkart.ranger.finder.sharded.MapBasedServiceRegistry.java
@Override public void nodes(List<ServiceNode<T>> nodes) { ListMultimap<T, ServiceNode<T>> serviceNodes = ArrayListMultimap.create(); for (ServiceNode<T> serviceNode : nodes) { serviceNodes.put(serviceNode.getNodeData(), serviceNode); }// w w w.j a v a 2s.c o m this.nodes.set(ImmutableListMultimap.copyOf(serviceNodes)); }
From source file:org.dishevelled.bio.variant.vcf.header.VcfPedigreeHeaderLine.java
/** * Create a new VCF PEDIGREE header line. * * @param attributes header line attributes, must not be null *//*from w w w . ja va 2s . c o m*/ VcfPedigreeHeaderLine(final ListMultimap<String, String> attributes) { checkNotNull(attributes); this.attributes = ImmutableListMultimap.copyOf(attributes); }
From source file:io.airlift.http.client.UnexpectedResponseException.java
public UnexpectedResponseException(String message, Request request, int statusCode, String statusMessage, ListMultimap<String, String> headers) { super(message); this.request = request; this.statusCode = statusCode; this.statusMessage = statusMessage; this.headers = ImmutableListMultimap.copyOf(headers); }
From source file:org.sonar.api.resources.ResourceTypeTree.java
private ResourceTypeTree(Builder builder) { this.types = ImmutableList.copyOf(builder.types); this.relations = ImmutableListMultimap.copyOf(builder.relations); this.root = builder.root; }
From source file:org.jboss.capedwarf.shared.config.IndexesXml.java
public ListMultimap<String, Index> getIndexes() { return ImmutableListMultimap.copyOf(indexes); }
From source file:io.airlift.http.client.Request.java
public Request(URI uri, String method, ListMultimap<String, String> headers, BodyGenerator bodyGenerator) { Preconditions.checkNotNull(uri, "uri is null"); Preconditions.checkNotNull(uri.getHost(), "uri does not have a host: %s", uri); Preconditions.checkNotNull(method, "method is null"); Preconditions.checkNotNull(uri.getScheme(), "uri does not have a scheme: %s", uri); String scheme = uri.getScheme().toLowerCase(); Preconditions.checkArgument(!"http".equals(scheme) || !"https".equals(scheme), "uri scheme must be http or https: %s", uri); this.uri = validateUri(uri); this.method = method; this.headers = ImmutableListMultimap.copyOf(headers); this.bodyGenerator = bodyGenerator; }
From source file:io.prestosql.server.MockHttpServletRequest.java
public MockHttpServletRequest(ListMultimap<String, String> headers, String remoteAddress) { this.headers = ImmutableListMultimap.copyOf(requireNonNull(headers, "headers is null")); this.remoteAddress = requireNonNull(remoteAddress, "remoteAddress is null"); }