JavaStreamlimit

Returns a stream truncated to be no longer than maxSize.

Syntax

stream.limit(maxSize)