Search in sources :

Example 1 with ImmutableIntStack

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);
}
Also used : ImmutableIntStack(org.eclipse.collections.api.stack.primitive.ImmutableIntStack) Test(org.junit.Test)

Aggregations

ImmutableIntStack (org.eclipse.collections.api.stack.primitive.ImmutableIntStack)1 Test (org.junit.Test)1