void (@NotNull String pattern, @NotNull ProgressIndicator progressIndicator, @NotNull Processor<? super Object> consumer) { boolean flag = true; Iterator<String> iterator = Arrays.asList(items).iterator(); while (flag && iterator.hasNext()) { String next = iterator.next(); flag = consumer.process(next); } }