Search in sources :

Example 6 with LongStream

use of java8.util.stream.LongStream in project streamsupport by stefan-zobel.

the class ConcatTest method assertLongConcat.

private void assertLongConcat(Stream<Integer> s1, Stream<Integer> s2, boolean parallel, boolean ordered) {
    LongStream result = LongStreams.concat(s1.mapToLong(Integer::longValue), s2.mapToLong(Integer::longValue));
    assertEquals(result.isParallel(), parallel);
    assertConcatContent(result.spliterator(), ordered, StreamSupport.stream(expected).mapToLong(Integer::longValue).spliterator());
}
Also used : LongStream(java8.util.stream.LongStream)

Aggregations

LongStream (java8.util.stream.LongStream)5 List (java.util.List)4 Function (java8.util.function.Function)4 DoubleStream (java8.util.stream.DoubleStream)4 IntStream (java8.util.stream.IntStream)4 OpTestCase (java8.util.stream.OpTestCase)4 Test (org.testng.annotations.Test)4 Consumer (java8.util.function.Consumer)3 IntStreams (java8.util.stream.IntStreams)3 RefStreams (java8.util.stream.RefStreams)3 Stream (java8.util.stream.Stream)3 StreamSupport (java8.util.stream.StreamSupport)3 ArrayList (java.util.ArrayList)2 Comparator (java.util.Comparator)2 HashMap (java.util.HashMap)2 Map (java.util.Map)2 Set (java.util.Set)2 Spliterator (java8.util.Spliterator)2 Spliterators (java8.util.Spliterators)2 DefaultMethodStreams (java8.util.stream.DefaultMethodStreams)2