This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public final class ElementCollectors { | |
private static final String MESSAGE_SINGLE_MANY_ITEMS = "More than one items"; | |
private ElementCollectors() { | |
// utils | |
} | |
public static <T> Collector<T, ?, T> single(String errorMessage) { | |
return single(Collectors.toList(), errorMessage); |