boolean (@SystemIndependent String path) { if (!myProjects.contains(path)) { return false; } List<String> existing = new ArrayList<>(myProjects); int index = existing.indexOf(path); if (index <= 0) { return false; } List<String> projects = new ArrayList<>(existing.size()); projects.add(path); projects.addAll(existing.subList(0, index)); projects.addAll(existing.subList(index + 1, existing.size())); save(projects); modCounter.incrementAndGet(); return true; }