com.google.common.collect.Sets



API Populatity

100 Client projects

Project: com.google

Project JetBrains/intellij-community in file ...com.jetbrains.python.refactoring.PyDefUseUtil.java (2010-08-13)
@@ -1,5 +1,6 @@
 package com.jetbrains.python.refactoring;
 
+import com.google.common.collect.Sets;
 import com.intellij.codeInsight.controlflow.ControlFlow;
 import com.intellij.codeInsight.controlflow.ControlFlowUtil;
 import com.intellij.codeInsight.controlflow.Instruction;
@@ -76,7 +77,7 @@ public class PyDefUseUtil {
     final int instr = ControlFlowUtil.findInstructionNumberByElement(instructions, anchor);
     assert instr >= 0;
     final boolean[] visited = new boolean[instructions.length];
-    final Collection<PyElement> result = new HashSet<PyElement>();
+    final Collection<PyElement> result = Sets.newHashSet();
     for (Instruction instruction : instructions[instr].allSucc()) {
       getPostRefs(var, instructions, instruction.num(), visited, result);
     }
Project JetBrains/kotlin in file ...org.jetbrains.jet.lang.resolve.OverridingUtil.java (2014-08-14)
@@ -16,7 +16,6 @@
 
 package org.jetbrains.jet.lang.resolve;
 
-import com.google.common.collect.Sets;
 import com.intellij.util.containers.ContainerUtil;
 import kotlin.Function1;
 import kotlin.KotlinPackage;
@@ -250,7 +249,7 @@ public class OverridingUtil {
             @NotNull ClassDescriptor current,
             @NotNull DescriptorSink sink
     ) {
-        Collection<CallableMemberDescriptor> notOverridden = Sets.newLinkedHashSet(membersFromSupertypes);
+        Collection<CallableMemberDescriptor> notOverridden = new LinkedHashSet<CallableMemberDescriptor>(membersFromSupertypes);
 
         for (CallableMemberDescriptor fromCurrent : membersFromCurrent) {
             Collection<CallableMemberDescriptor> bound =
Project JetBrains/kotlin in file ...org.jetbrains.jet.lang.types.CommonSupertypes.java (2014-08-14)
@@ -16,7 +16,6 @@
 
 package org.jetbrains.jet.lang.types;
 
-import com.google.common.collect.Sets;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 import org.jetbrains.jet.lang.descriptors.ClassDescriptor;
@@ -107,7 +106,7 @@ public class CommonSupertypes {
 
         List<TypeConstructor> order = null;
         for (JetType type : types) {
-            Set<TypeConstructor> visited = Sets.newHashSet();
+            Set<TypeConstructor> visited = new HashSet<TypeConstructor>();
             order = topologicallySortSuperclassesAndRecordAllInstances(type, constructorToAllInstances, visited);
 
             if (commonSuperclasses == null) {