use of org.eclipse.collections.api.stack.primitive.ImmutableLongStack in project eclipse-collections by eclipse.
the class PrimitiveStreamsTest method toImmutableLongStack.
@Test
public void toImmutableLongStack() {
ImmutableLongStack stack = PrimitiveStreams.iLongStack(LongStream.rangeClosed(1, 10));
Assert.assertEquals(LongStacks.mutable.ofAll(IntInterval.oneTo(10).asLazy().collectLong(i -> (long) i)), stack);
Assert.assertEquals(LongStacks.mutable.ofAll(LongStream.rangeClosed(1, 10)), stack);
}
Aggregations