public class StreamUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static <T> java.util.function.Predicate<T> |
distinctByKey(java.util.function.Function<? super T,?> key)
Usage: Stream.filter(StreamUtils.distinctByKey(node to node.getSubnet[0]))
|
public static <T> java.util.function.Predicate<T> distinctByKey(java.util.function.Function<? super T,?> key)
T - Type of the Element to filter forkey - The key to filter for