OptionalCollector is the collector specialization which return type is Optional<R> and it has methods which mimic the optional behavior (like orElse, orElseGet, get, map, filter, etc.). Should support both short-circuiting and non-short-circuiting collection.