Search in sources :

Example 1 with MutableIntStack

use of org.eclipse.collections.api.stack.primitive.MutableIntStack in project eclipse-collections by eclipse.

the class PrimitiveStreamsTest method toIntStack.

@Test
public void toIntStack() {
    MutableIntStack stack = PrimitiveStreams.mIntStack(IntStream.rangeClosed(1, 10));
    Assert.assertEquals(IntStacks.mutable.withAll(IntInterval.oneTo(10)), stack);
    Assert.assertEquals(IntStacks.immutable.ofAll(IntStream.rangeClosed(1, 10)), stack);
}
Also used : MutableIntStack(org.eclipse.collections.api.stack.primitive.MutableIntStack) Test(org.junit.Test)

Aggregations

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