Stream<String> (boolean ignoreCase, JTextArea list) { return Arrays.stream(StringUtil.splitByLines(list.getText())) .filter(StringUtil::isNotEmpty) .map(s -> ignoreCase ? s.toLowerCase(Locale.getDefault()) : s); }