Example usage for Java com.google.common.collect MoreCollectors fields, constructors, methods, implement or subclass
The text is from its open source code.
Collector | onlyElement() A collector that takes a stream containing exactly one element and returns that element. |
Collector | toOptional() A collector that converts a stream of zero or one elements to an Optional . |