skip, limit and slice

Ali Ebrahimi ali.ebrahimi1781 at gmail.com
Wed Dec 5 21:18:55 PST 2012


Hi,

On Wed, Dec 5, 2012 at 7:36 PM, Brian Goetz <brian.goetz at oracle.com> wrote:

> Correct.  If you look at the implementation:
>
>     @Override
>     public Stream<U> limit(long limit) {
>         return pipeline(new SliceOp<U>(0, limit));
>     }
>
>     @Override
>     public Stream<U> skip(long toSkip) {
>         return pipeline(new SliceOp<U>(toSkip));
>     }
>
>     @Override
>     public Stream<U> slice(long skip, long limit) {
>         return pipeline(new SliceOp<U>(skip, limit));
>     }
>
> they are strictly for convenience.
>
>
Wouldn't be substream better than slice as substring for String.

Regards,
Ali Ebrahimi


More information about the lambda-libs-spec-observers mailing list