List of usage examples for com.google.common.collect ImmutableMap of
public static <K, V> ImmutableMap<K, V> of()
From source file:com.facebook.presto.sql.planner.TypeProvider.java
public static TypeProvider empty() { return new TypeProvider(ImmutableMap.of()); }
From source file:org.openqa.selenium.devtools.Console.java
public static Command<Void> enable() { return new Command<>("Console.enable", ImmutableMap.of()); }
From source file:com.facebook.presto.tpcds.TpcdsQueryRunner.java
public static DistributedQueryRunner createQueryRunner(Map<String, String> extraProperties) throws Exception { return createQueryRunner(extraProperties, ImmutableMap.of()); }
From source file:org.killbill.billing.plugin.adyen.api.AdyenModelPluginBase.java
protected static Map toMap(@Nullable final String additionalData) { if (additionalData == null) { return ImmutableMap.of(); }//from w w w. j a v a2 s . com try { return objectMapper.readValue(additionalData, Map.class); } catch (final IOException e) { return ImmutableMap.of(); } }
From source file:org.glowroot.plugin.servlet.HttpSessions.java
static ImmutableMap<String, String> getSessionAttributes(HttpSession session) { Set<String> capturePaths = ServletPluginProperties.captureSessionAttributePaths(); if (capturePaths.isEmpty()) { return ImmutableMap.of(); }/*from w ww . ja v a 2s.c o m*/ Map<String, String> captureMap = Maps.newHashMap(); // dump only http session attributes in list for (String capturePath : capturePaths) { if (capturePath.equals("*")) { captureAllSessionAttributes(session, captureMap); } else if (capturePath.endsWith(".*")) { captureWildcardPath(session, captureMap, capturePath.substring(0, capturePath.length() - 2)); } else { captureNonWildcardPath(session, captureMap, capturePath); } } return ImmutableMap.copyOf(captureMap); }
From source file:io.prestosql.benchmark.BenchmarkQueryRunner.java
public static LocalQueryRunner createLocalQueryRunner() { return createLocalQueryRunner(ImmutableMap.of()); }
From source file:com.mingo.parser.xml.dom.DomUtil.java
/** * Transform node attributes to map./* w w w . jav a2 s. c o m*/ * * @param node {@link Node} * @return map : key - attribute name; value - attribute value */ public static Map<String, String> getAttributes(Node node) { Map<String, String> attributes = ImmutableMap.of(); if (node.hasAttributes()) { ImmutableMap.Builder builder = ImmutableMap.builder(); // get attributes names and values NamedNodeMap nodeMap = node.getAttributes(); for (int i = 0; i < nodeMap.getLength(); i++) { Node currentNode = nodeMap.item(i); builder.put(currentNode.getNodeName(), currentNode.getNodeValue()); } attributes = builder.build(); } return attributes; }
From source file:com.opengamma.collect.named.MockInvalid2LookupFunction.java
@Override public ImmutableMap<String, MockInvalid2> lookupAll() { return ImmutableMap.of(); }
From source file:com.opengamma.strata.collect.named.SampleInvalid2LookupFunction.java
@Override public ImmutableMap<String, SampleInvalid2> lookupAll() { return ImmutableMap.of(); }
From source file:forms.meta.MetaMap.java
/** Returns an empty MetaMap. */ public static MetaMap of() { return new MetaMap(ImmutableMap.of()); }