List of usage examples for com.google.common.collect ImmutableMap copyOf
public static <K, V> ImmutableMap<K, V> copyOf(Iterable<? extends Entry<? extends K, ? extends V>> entries)
From source file:com.facebook.buck.intellij.ideabuck.config.BuckExecutableDetector.java
public static String getExecutable(Path suggestedExecutable) { return EXECUTABLE_FINDER.getExecutable(suggestedExecutable, ImmutableMap.copyOf(System.getenv())) .toString();//from w w w. ja v a 2 s . c o m }
From source file:org.jclouds.aliyun.ecs.domain.SecurityGroup.java
@SerializedNames({ "SecurityGroupId", "Description", "SecurityGroupName", "VpcId", "Tags" }) public static SecurityGroup create(String id, String description, String name, String vpcId, Map<String, List<Tag>> tags) { return new AutoValue_SecurityGroup(id, description, name, vpcId, tags == null ? ImmutableMap.<String, List<Tag>>of() : ImmutableMap.copyOf(tags)); }
From source file:chess_.pgn.PGNGameTags.java
private PGNGameTags(final TagsBuilder builder) { this.gameTags = ImmutableMap.copyOf(builder.gameTags); }
From source file:com.facebook.buck.android.AssumeAndroidPlatform.java
private static AndroidDirectoryResolver getAndroidDirectoryResolver() { ProjectFilesystem projectFilesystem = new ProjectFilesystem(Paths.get(".").toAbsolutePath()); return new DefaultAndroidDirectoryResolver(projectFilesystem.getRootPath().getFileSystem(), ImmutableMap.copyOf(System.getenv()), Optional.empty(), Optional.empty()); }
From source file:org.jclouds.aliyun.ecs.domain.VpcAttributes.java
@SerializedNames({ "NatIpAddress", "PrivateIpAddress", "VSwitchId", "VpcId" }) public static VpcAttributes create(String natIpAddress, Map<String, List<String>> privateIpAddress, String vSwitchId, String vpcId) { return new AutoValue_VpcAttributes(natIpAddress, privateIpAddress == null ? ImmutableMap.<String, List<String>>of() : ImmutableMap.copyOf(privateIpAddress), vSwitchId, vpcId);//from w w w .ja va 2 s.c om }
From source file:com.opengamma.financial.security.summary.Summary.java
public Summary(Map<SummaryField, Object> fieldMap) { _fieldMap = ImmutableMap.copyOf(fieldMap); _error = null; }
From source file:org.jclouds.aliyun.ecs.domain.AvailableZone.java
@SerializedNames({ "Status", "RegionId", "AvailableResources", "ZoneId" }) public static AvailableZone create(String status, String regionId, Map<String, List<AvailableResource>> availableResources, String zoneId) { return new AutoValue_AvailableZone(status, regionId, availableResources == null ? ImmutableMap.<String, List<AvailableResource>>of() : ImmutableMap.copyOf(availableResources), zoneId);/*from w ww .j a v a 2 s . c o m*/ }
From source file:org.apache.drill.exec.server.options.FragmentOptionManager.java
private static Map<String, OptionValue> getMapFromOptionList(OptionList options) { Map<String, OptionValue> tmp = Maps.newHashMap(); for (OptionValue v : options) { tmp.put(v.name, v);//from w w w .j a va 2 s . co m } return ImmutableMap.copyOf(tmp); }
From source file:com.facebook.buck.cli.BuckConfigTestUtils.java
public static BuckConfig createWithDefaultFilesystem(TemporaryPaths temporaryFolder, Reader reader) throws IOException { ProjectFilesystem projectFilesystem = new ProjectFilesystem(temporaryFolder.getRoot()); return createFromReader(reader, projectFilesystem, Architecture.detect(), Platform.detect(), ImmutableMap.copyOf(System.getenv())); }
From source file:com.blacklocus.misc.NoNullsMap.java
public static <K, V> ImmutableMap<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3) { NoNullsMap<K, V> map = new NoNullsMap<K, V>(3); map.put(k1, v1);// ww w . j a v a 2 s . com map.put(k2, v2); map.put(k3, v3); return ImmutableMap.copyOf(map); }