/// <summary> /// Appends a "slice" operation to the provided DoubleStream. The slice /// operation may be may be skip-only, limit-only, or skip-and-limit. /// </summary> /// <param name="upstream"> A DoubleStream </param> /// <param name="skip"> The number of elements to skip. Must be >= 0. </param> /// <param name="limit"> The maximum size of the resulting stream, or -1 if no limit /// is to be imposed </param> public static DoubleStream makeDouble <T1>(AbstractPipeline <T1> upstream, long skip, long limit) { if (skip < 0) { throw new IllegalArgumentException("Skip must be non-negative: " + skip); } return(new StatefulOpAnonymousInnerClassHelper(upstream, Flags(limit), skip, limit)); }
/// <summary> /// Appends a "distinct" operation to the provided stream, and returns the /// new stream. /// </summary> /// @param <T> the type of both input and output elements </param> /// <param name="upstream"> a reference stream with element type T </param> /// <returns> the new stream </returns> internal static ReferencePipeline <T, T> makeRef <T, T1>(AbstractPipeline <T1> upstream) { return(new StatefulOpAnonymousInnerClassHelper(upstream, StreamOpFlag.IS_DISTINCT | StreamOpFlag.NOT_SIZED)); }
/// <summary> /// Appends a "sorted" operation to the provided stream. /// </summary> /// @param <T> the type of both input and output elements </param> /// <param name="upstream"> a reference stream with element type T </param> internal static DoubleStream makeDouble <T, T1>(AbstractPipeline <T1> upstream) { return(new OfDouble(upstream)); }
/// <summary> /// Appends a "sorted" operation to the provided stream. /// </summary> /// @param <T> the type of both input and output elements </param> /// <param name="upstream"> a reference stream with element type T </param> internal static LongStream makeLong <T, T1>(AbstractPipeline <T1> upstream) { return(new OfLong(upstream)); }
/// <summary> /// Appends a "sorted" operation to the provided stream. /// </summary> /// @param <T> the type of both input and output elements </param> /// <param name="upstream"> a reference stream with element type T </param> internal static IntStream makeInt <T, T1>(AbstractPipeline <T1> upstream) { return(new OfInt(upstream)); }
/// <summary> /// Appends a "sorted" operation to the provided stream. /// </summary> /// @param <T> the type of both input and output elements </param> /// <param name="upstream"> a reference stream with element type T </param> /// <param name="comparator"> the comparator to order elements by </param> //JAVA TO C# CONVERTER TODO TASK: There is no .NET equivalent to the Java 'super' constraint: //ORIGINAL LINE: static <T> Stream<T> makeRef(AbstractPipeline<?, T, ?> upstream, java.util.Comparator<? base T> comparator) internal static Stream <T> makeRef <T, T1, T2>(AbstractPipeline <T1> upstream, IComparer <T2> comparator) { return(new OfRef <>(upstream, comparator)); }
/// <summary> /// Appends a "sorted" operation to the provided stream. /// </summary> /// @param <T> the type of both input and output elements </param> /// <param name="upstream"> a reference stream with element type T </param> internal static Stream <T> makeRef <T, T1>(AbstractPipeline <T1> upstream) { return(new OfRef <>(upstream)); }