java.util.LinkedHashMapcom.google.common.collect.Maps



Project jclouds/jclouds in file ...ionConstructorAndReflectiveTypeAdapterFactory.java (2012-11-04)
@@ -25,11 +25,11 @@ import java.io.IOException;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Type;
-import java.util.LinkedHashMap;
 import java.util.Map;
 
 import org.jclouds.json.internal.NamingStrategies.ConstructorFieldNamingStrategy;
 
+import com.google.common.collect.Maps;
 import com.google.gson.FieldNamingStrategy;
 import com.google.gson.Gson;
 import com.google.gson.JsonSyntaxException;
@@ -248,7 +248,7 @@ public final class DeserializationConstructorAndReflectiveTypeAdapterFactory imp
 
    @SuppressWarnings("unchecked")
    private Map<String, ParameterReader> getParameterReaders(Gson context, TypeToken<?> declaring, Constructor<?> constructor) {
-      Map<String, ParameterReader> result = new LinkedHashMap<String, ParameterReader>();
+      Map<String, ParameterReader> result = Maps.newLinkedHashMap();
 
       for (int index = 0; index < constructor.getGenericParameterTypes().length; index++) {
          Type parameterType = getTypeOfConstructorParameter(declaring, constructor, index);
Project jclouds/jclouds in file ...g.jclouds.glesys.features.ServerApiExpectTest.java (2012-11-04)
@@ -22,7 +22,6 @@ import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertNull;
 import static org.testng.Assert.assertTrue;
 
-import java.util.LinkedHashMap;
 import java.util.Map;
 
 import javax.ws.rs.core.MediaType;
@@ -54,6 +53,7 @@ import org.jclouds.rest.ResourceNotFoundException;
 import org.testng.annotations.Test;
 
 import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Maps;
 
 /**
  * Tests annotation parsing of {@code ServerAsyncApi}
@@ -92,7 +92,7 @@ public class ServerApiExpectTest extends BaseGleSYSApiExpectTest {
                        .addHeader("Authorization", "Basic aWRlbnRpdHk6Y3JlZGVudGlhbA==").build(),
             HttpResponse.builder().statusCode(204).payload(payloadFromResource("/server_allowed_arguments.json")).build()).getServerApi();
 
-      Map<String, AllowedArgumentsForCreateServer> expected = new LinkedHashMap<String, AllowedArgumentsForCreateServer>();
+      Map<String, AllowedArgumentsForCreateServer> expected = Maps.newLinkedHashMap();
       AllowedArgumentsForCreateServer openvz = AllowedArgumentsForCreateServer.builder()
             .dataCenters("Amsterdam", "Falkenberg", "New York City", "Stockholm")
             .memorySizes(128, 256, 512, 768, 1024, 1536, 2048, 2560, 3072, 3584, 4096, 5120, 6144, 7168, 8192, 9216, 10240, 11264, 12288)
Project jclouds/legacy-jclouds in file ...ionConstructorAndReflectiveTypeAdapterFactory.java (2012-11-04)
@@ -25,11 +25,11 @@ import java.io.IOException;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Type;
-import java.util.LinkedHashMap;
 import java.util.Map;
 
 import org.jclouds.json.internal.NamingStrategies.ConstructorFieldNamingStrategy;
 
+import com.google.common.collect.Maps;
 import com.google.gson.FieldNamingStrategy;
 import com.google.gson.Gson;
 import com.google.gson.JsonSyntaxException;
@@ -248,7 +248,7 @@ public final class DeserializationConstructorAndReflectiveTypeAdapterFactory imp
 
    @SuppressWarnings("unchecked")
    private Map<String, ParameterReader> getParameterReaders(Gson context, TypeToken<?> declaring, Constructor<?> constructor) {
-      Map<String, ParameterReader> result = new LinkedHashMap<String, ParameterReader>();
+      Map<String, ParameterReader> result = Maps.newLinkedHashMap();
 
       for (int index = 0; index < constructor.getGenericParameterTypes().length; index++) {
          Type parameterType = getTypeOfConstructorParameter(declaring, constructor, index);
Project jclouds/legacy-jclouds in file ...g.jclouds.glesys.features.ServerApiExpectTest.java (2012-11-04)
@@ -22,7 +22,6 @@ import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertNull;
 import static org.testng.Assert.assertTrue;
 
-import java.util.LinkedHashMap;
 import java.util.Map;
 
 import javax.ws.rs.core.MediaType;
@@ -54,6 +53,7 @@ import org.jclouds.rest.ResourceNotFoundException;
 import org.testng.annotations.Test;
 
 import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Maps;
 
 /**
  * Tests annotation parsing of {@code ServerAsyncApi}
@@ -92,7 +92,7 @@ public class ServerApiExpectTest extends BaseGleSYSApiExpectTest {
                        .addHeader("Authorization", "Basic aWRlbnRpdHk6Y3JlZGVudGlhbA==").build(),
             HttpResponse.builder().statusCode(204).payload(payloadFromResource("/server_allowed_arguments.json")).build()).getServerApi();
 
-      Map<String, AllowedArgumentsForCreateServer> expected = new LinkedHashMap<String, AllowedArgumentsForCreateServer>();
+      Map<String, AllowedArgumentsForCreateServer> expected = Maps.newLinkedHashMap();
       AllowedArgumentsForCreateServer openvz = AllowedArgumentsForCreateServer.builder()
             .dataCenters("Amsterdam", "Falkenberg", "New York City", "Stockholm")
             .memorySizes(128, 256, 512, 768, 1024, 1536, 2048, 2560, 3072, 3584, 4096, 5120, 6144, 7168, 8192, 9216, 10240, 11264, 12288)
Project google/closure-compiler in file ...src.com.google.javascript.jscomp.AliasStrings.java (2011-02-26)
@@ -16,18 +16,19 @@
 
 package com.google.javascript.jscomp;
 
+import com.google.common.collect.Maps;
 import com.google.javascript.jscomp.NodeTraversal.AbstractPostOrderCallback;
 import com.google.javascript.rhino.Node;
 import com.google.javascript.rhino.Token;
 
 import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.LinkedHashMap;
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 import java.util.Map.Entry;
+import java.util.Set;
+import java.util.SortedMap;
 import java.util.logging.Logger;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -64,8 +65,7 @@ class AliasStrings extends AbstractPostOrderCallback
 
   private final boolean outputStringUsage;
 
-  private final Map<String, StringInfo> stringInfoMap =
-      new LinkedHashMap<String, StringInfo>();
+  private final SortedMap<String, StringInfo> stringInfoMap = Maps.newTreeMap();
 
   private final Set<String> usedHashedAliases = new LinkedHashSet<String>();