use of org.eclipse.collections.api.stack.primitive.ImmutableIntStack in project eclipse-collections by eclipse.
the class PrimitiveStreamsTest method toImmutableIntStack.
@Test
public void toImmutableIntStack() {
ImmutableIntStack stack = PrimitiveStreams.iIntStack(IntStream.rangeClosed(1, 10));
Assert.assertEquals(IntStacks.immutable.withAll(IntInterval.oneTo(10)), stack);
Assert.assertEquals(IntStacks.mutable.ofAll(IntStream.rangeClosed(1, 10)), stack);
}
Aggregations