4 ms·
What's so bad about this? input.stream().filter(i -> validations.contains(i)).map(i -> "'" + i + "'").collect(Collectors.joining(",")) It doesn't compare wi
by TheCoelacanth 10y ago
What's so bad about this?
input.stream().filter(i -> validations.contains(i)).map(i -> "'" + i + "'").collect(Collectors.joining(","))
It doesn't compare with ruby for code golf, but for readability it's practically identical.
- matwood 10y agoI agree. Depending on how validations is defined you could also use a method reference .filter(validations::contains).map...