private Set<Sdk> sdkByModuleToSdkSet(@NotNull Map<Module, Sdk> sdkByModule) { Set<Sdk> sdkSet = new THashSet<>(); for (@Nullable Sdk sdk : sdkByModule.values()) { if (sdk != null) { sdkSet.add(sdk); } } return sdkSet; }
@NotNull private static Set<StringRef> stringRefSet(@NotNull Set<String> stringSet) { Set<StringRef> stringRefSet = new THashSet<>(); for (String string : stringSet) { stringRefSet.add(StringRef.fromNullableString(string)); } return stringRefSet; }
@NotNull @Override public Set<com.intellij.lang.Language> getLanguages() { return new THashSet<>(Arrays.asList(getTemplateDataLanguage(), getBaseLanguage(), ElixirLanguage.INSTANCE)); }
@Nullable public static CallDefinitions from(@NotNull Chunk chunk, @NotNull Chunk.TypeID typeID, @Nullable Atoms atoms) { CallDefinitions callDefinitions = null; if (chunk.typeID.equals(typeID.toString()) && chunk.data.length >= 4) { Collection<CallDefinition> callDefinitionCollection = new THashSet<CallDefinition>(); int offset = 0; Pair<Long, Integer> exportCountByteCount = unsignedInt(chunk.data, 0); long exportCount = exportCountByteCount.first; offset += exportCountByteCount.second; for (long i = 0; i < exportCount; i++) { kotlin.Pair<CallDefinition, Integer> callDefinitionByteCount = CallDefinition.Companion.from(chunk, offset, atoms); callDefinitionCollection.add(callDefinitionByteCount.getFirst()); offset += callDefinitionByteCount.getSecond(); } callDefinitions = new CallDefinitions(typeID, callDefinitionCollection); } return callDefinitions; }
Set<StringRef> nameSet = new THashSet<>(nameSetSize);
@Override public void build(@NotNull Target target, @NotNull DirtyFilesHolder<SourceRootDescriptor, Target> holder, @NotNull BuildOutputConsumer outputConsumer, @NotNull CompileContext context) throws ProjectBuildException, IOException { LOGGER.info(target.getPresentableName()); final Set<File> filesToCompile = new THashSet<>(FileUtil.FILE_HASHING_STRATEGY); holder.processDirtyFiles((target1, file, root) -> { boolean isAcceptFile = target1.isTests() ? ELIXIR_TEST_SOURCE_FILTER.accept(file) : ELIXIR_SOURCE_FILTER.accept(file); if (isAcceptFile && ourCompilableModuleTypes.contains(target1.getModule().getModuleType())) { filesToCompile.add(file); } return true; }); if (filesToCompile.isEmpty() && !holder.hasRemovedFiles()) return; JpsModule module = target.getModule(); JpsProject project = module.getProject(); CompilerOptions compilerOptions = Extension.getOrCreateExtension(project).getOptions(); if (compilerOptions.useMixCompiler) { doBuildWithMix(target, context, module, compilerOptions); } else { // elixirc can not compile tests now. if (!target.isTests()) { doBuildWithElixirc(target, context, module, compilerOptions, filesToCompile); } } }
final String key = StringUtil.join(parts, Constants.DOLLAR); if (cacheMap.get(key) == null) { final THashSet<VirtualFile> files = new THashSet<>(1000);
public synchronized Set<String> read(@NotNull DataInput in) throws IOException { Set<String> set = new THashSet<>(); for(int r = in.readInt(); r > 0; --r) { set.add(EnumeratorStringDescriptor.INSTANCE.read(in)); } return set; } }
public static Collection union (Collection c1, Collection c2) { Set set = new THashSet (c1); set.addAll (c2); return set; }
private Set findSet (Object obj) { Set container = (Set) obj2set.get (obj); if (container != null) { return container; } else { Set newSet = new THashSet (); newSet.add (obj); obj2set.put (obj, newSet); return newSet; } }
@NotNull @Contract(pure=true) public static <T> THashSet<T> newTroveSet() { return new THashSet<T>(); }
@NotNull @Contract(pure=true) public static <T> THashSet<T> newTroveSet(@NotNull TObjectHashingStrategy<T> strategy, @NotNull Collection<T> elements) { return new THashSet<T>(elements, strategy); }
Region (Factor ptl) { this (); factors = new THashSet (); factors.add (ptl); vars = new ArrayList (ptl.varSet ()); }
Region (Factor ptl) { this (); factors = new THashSet (); factors.add (ptl); vars = new ArrayList (ptl.varSet ()); }
public static boolean processSupers(@Nullable PsiClass aClass, boolean includeSelf, @NotNull Processor<PsiClass> superProcessor) { if (aClass == null) return true; if (includeSelf && !superProcessor.process(aClass)) return false; return processSupers(aClass, superProcessor, new THashSet<PsiClass>()); }
public Set sepsetPotentials() { THashSet set = new THashSet(); TIntObjectIterator it = sepsets.iterator(); while (it.hasNext()) { it.advance(); Factor ptl = ((Sepset) it.value()).ptl; set.add(ptl); } return set; }