java.util.Listjava.util.Set



Project Athou/commafeed in file ...ommafeed.frontend.rest.resources.AbstractREST.java (2013-03-29)
@@ -1,7 +1,7 @@
 package com.commafeed.frontend.rest.resources;
 
 import java.lang.reflect.Method;
-import java.util.List;
+import java.util.Set;
 
 import javax.annotation.PostConstruct;
 import javax.inject.Inject;
@@ -129,7 +129,7 @@ public abstract class AbstractREST {
 	}
 
 	private boolean checkRole(User user, SecurityCheck annotation) {
-		List<String> roles = userRoleService.getRoles(user);
+		Set<String> roles = userRoleService.getRoles(user);
 		for (String role : annotation.value()) {
 			if (!roles.contains(role)) {
 				return false;
Project JetBrains/intellij-community in file ...lij.refactoring.rename.NameSuggestionProvider.java (2010-07-17)
@@ -23,7 +23,7 @@ import com.intellij.psi.codeStyle.SuggestedNameInfo;
 import org.jetbrains.annotations.Nullable;
 
 import java.util.Collection;
-import java.util.List;
+import java.util.Set;
 
 /**
  * @author yole
@@ -32,7 +32,7 @@ public interface NameSuggestionProvider {
   ExtensionPointName<NameSuggestionProvider> EP_NAME = ExtensionPointName.create("com.intellij.nameSuggestionProvider");
 
   @Nullable
-  SuggestedNameInfo getSuggestedNames(PsiElement element, PsiElement nameSuggestionContext, List<String> result);
+  SuggestedNameInfo getSuggestedNames(PsiElement element, PsiElement nameSuggestionContext, Set<String> result);
 
   @Nullable
   Collection<LookupElement> completeName(PsiElement element, final PsiElement nameSuggestionContext, final String prefix);
Project JetBrains/intellij-community in file ...m.intellij.util.xml.DomNameSuggestionProvider.java (2010-07-17)
@@ -25,13 +25,13 @@ import com.intellij.util.containers.ContainerUtil;
 import org.jetbrains.annotations.Nullable;
 
 import java.util.Collection;
-import java.util.List;
+import java.util.Set;
 
 /**
  * @author Gregory.Shrago
  */
 public class DomNameSuggestionProvider implements NameSuggestionProvider {
-  public SuggestedNameInfo getSuggestedNames(final PsiElement element, final PsiElement nameSuggestionContext, final List<String> result) {
+  public SuggestedNameInfo getSuggestedNames(final PsiElement element, final PsiElement nameSuggestionContext, final Set<String> result) {
     if (element instanceof PsiMetaOwner) {
       final PsiMetaData psiMetaData = ((PsiMetaOwner)element).getMetaData();
       if (psiMetaData instanceof DomMetaData) {
Project JetBrains/kotlin in file ...jet.lang.resolve.calls.autocasts.DataFlowInfo.java (2012-11-16)
@@ -20,7 +20,7 @@ import com.google.common.collect.ImmutableMap;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.jet.lang.types.JetType;
 
-import java.util.List;
+import java.util.Set;
 
 public interface DataFlowInfo {
     DataFlowInfo EMPTY = new DelegatingDataFlowInfo(null, ImmutableMap.<DataFlowValue, Nullability>of(),
@@ -30,7 +30,7 @@ public interface DataFlowInfo {
     Nullability getNullability(@NotNull DataFlowValue key);
 
     @NotNull
-    List<JetType> getPossibleTypes(@NotNull DataFlowValue key);
+    Set<JetType> getPossibleTypes(@NotNull DataFlowValue key);
 
     @NotNull
     DataFlowInfo equate(@NotNull DataFlowValue a, @NotNull DataFlowValue b);
Project SonarSource/sonarqube in file ...ar.batch.symbol.DefaultSymbolTableBuilderTest.java (2014-12-17)
@@ -30,8 +30,8 @@ import org.sonar.batch.index.ComponentDataCache;
 import org.sonar.core.source.SnapshotDataTypes;
 
 import java.util.ArrayList;
-import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import static org.fest.assertions.Assertions.assertThat;
 import static org.mockito.Matchers.eq;
@@ -58,7 +58,7 @@ public class DefaultSymbolTableBuilderTest {
     ArgumentCaptor<SymbolData> argCaptor = ArgumentCaptor.forClass(SymbolData.class);
     verify(componentDataCache).setData(eq("foo"), eq(SnapshotDataTypes.SYMBOL_HIGHLIGHTING), argCaptor.capture());
 
-    Map<org.sonar.api.source.Symbol, List<Integer>> referencesBySymbol = argCaptor.getValue().referencesBySymbol();
+    Map<org.sonar.api.source.Symbol, Set<Integer>> referencesBySymbol = argCaptor.getValue().referencesBySymbol();
 
     assertThat(new ArrayList<Symbol>(referencesBySymbol.keySet())).containsExactly(firstSymbol, secondSymbol, thirdSymbol);
     assertThat(new ArrayList<Integer>(referencesBySymbol.get(firstSymbol))).containsExactly(32);