@NotNull public List<Pair<TaskInfo, ProgressIndicator>> getBackgroundProcesses() { synchronized (myOriginals) { if (myOriginals.isEmpty()) return Collections.emptyList(); List<Pair<TaskInfo, ProgressIndicator>> result = new ArrayList<Pair<TaskInfo, ProgressIndicator>>(myOriginals.size()); for (int i = 0; i < myOriginals.size(); i++) { result.add(Pair.<TaskInfo, ProgressIndicator>create(myInfos.get(i), myOriginals.get(i))); } return Collections.unmodifiableList(result); } }
private boolean hasProgressIndicators() { synchronized (myOriginals) { return !myOriginals.isEmpty(); } }