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