Search in sources :

Example 1 with ImmutableLongList

use of org.eclipse.collections.api.list.primitive.ImmutableLongList in project eclipse-collections by eclipse.

the class PrimitiveStreamsTest method toImmutableLongList.

@Test
public void toImmutableLongList() {
    ImmutableLongList list = PrimitiveStreams.iLongList(LongStream.rangeClosed(1, 10));
    Assert.assertEquals(IntInterval.oneTo(10).collectLong(i -> (long) i, LongLists.mutable.empty()), list);
    Assert.assertEquals(LongLists.mutable.ofAll(LongStream.rangeClosed(1, 10)), list);
}
Also used : IntStream(java.util.stream.IntStream) ImmutableLongList(org.eclipse.collections.api.list.primitive.ImmutableLongList) LongLists(org.eclipse.collections.impl.factory.primitive.LongLists) ImmutableIntStack(org.eclipse.collections.api.stack.primitive.ImmutableIntStack) MutableIntBag(org.eclipse.collections.api.bag.primitive.MutableIntBag) ImmutableDoubleList(org.eclipse.collections.api.list.primitive.ImmutableDoubleList) DoubleLists(org.eclipse.collections.impl.factory.primitive.DoubleLists) MutableIntList(org.eclipse.collections.api.list.primitive.MutableIntList) MutableLongList(org.eclipse.collections.api.list.primitive.MutableLongList) MutableDoubleStack(org.eclipse.collections.api.stack.primitive.MutableDoubleStack) IntSets(org.eclipse.collections.impl.factory.primitive.IntSets) ImmutableDoubleBag(org.eclipse.collections.api.bag.primitive.ImmutableDoubleBag) DoubleSets(org.eclipse.collections.impl.factory.primitive.DoubleSets) MutableIntSet(org.eclipse.collections.api.set.primitive.MutableIntSet) ImmutableLongSet(org.eclipse.collections.api.set.primitive.ImmutableLongSet) IntStacks(org.eclipse.collections.impl.factory.primitive.IntStacks) ImmutableDoubleStack(org.eclipse.collections.api.stack.primitive.ImmutableDoubleStack) ImmutableIntBag(org.eclipse.collections.api.bag.primitive.ImmutableIntBag) LongStream(java.util.stream.LongStream) MutableLongBag(org.eclipse.collections.api.bag.primitive.MutableLongBag) MutableDoubleSet(org.eclipse.collections.api.set.primitive.MutableDoubleSet) LongStacks(org.eclipse.collections.impl.factory.primitive.LongStacks) DoubleStacks(org.eclipse.collections.impl.factory.primitive.DoubleStacks) ImmutableDoubleSet(org.eclipse.collections.api.set.primitive.ImmutableDoubleSet) MutableIntStack(org.eclipse.collections.api.stack.primitive.MutableIntStack) Test(org.junit.Test) ImmutableIntList(org.eclipse.collections.api.list.primitive.ImmutableIntList) LongBags(org.eclipse.collections.impl.factory.primitive.LongBags) DoubleStream(java.util.stream.DoubleStream) MutableLongSet(org.eclipse.collections.api.set.primitive.MutableLongSet) IntLists(org.eclipse.collections.impl.factory.primitive.IntLists) MutableDoubleList(org.eclipse.collections.api.list.primitive.MutableDoubleList) MutableLongStack(org.eclipse.collections.api.stack.primitive.MutableLongStack) IntInterval(org.eclipse.collections.impl.list.primitive.IntInterval) ImmutableLongBag(org.eclipse.collections.api.bag.primitive.ImmutableLongBag) LongSets(org.eclipse.collections.impl.factory.primitive.LongSets) ImmutableLongStack(org.eclipse.collections.api.stack.primitive.ImmutableLongStack) ImmutableIntSet(org.eclipse.collections.api.set.primitive.ImmutableIntSet) DoubleBags(org.eclipse.collections.impl.factory.primitive.DoubleBags) Assert(org.junit.Assert) IntBags(org.eclipse.collections.impl.factory.primitive.IntBags) MutableDoubleBag(org.eclipse.collections.api.bag.primitive.MutableDoubleBag) ImmutableLongList(org.eclipse.collections.api.list.primitive.ImmutableLongList) Test(org.junit.Test)

Aggregations

DoubleStream (java.util.stream.DoubleStream)1 IntStream (java.util.stream.IntStream)1 LongStream (java.util.stream.LongStream)1 ImmutableDoubleBag (org.eclipse.collections.api.bag.primitive.ImmutableDoubleBag)1 ImmutableIntBag (org.eclipse.collections.api.bag.primitive.ImmutableIntBag)1 ImmutableLongBag (org.eclipse.collections.api.bag.primitive.ImmutableLongBag)1 MutableDoubleBag (org.eclipse.collections.api.bag.primitive.MutableDoubleBag)1 MutableIntBag (org.eclipse.collections.api.bag.primitive.MutableIntBag)1 MutableLongBag (org.eclipse.collections.api.bag.primitive.MutableLongBag)1 ImmutableDoubleList (org.eclipse.collections.api.list.primitive.ImmutableDoubleList)1 ImmutableIntList (org.eclipse.collections.api.list.primitive.ImmutableIntList)1 ImmutableLongList (org.eclipse.collections.api.list.primitive.ImmutableLongList)1 MutableDoubleList (org.eclipse.collections.api.list.primitive.MutableDoubleList)1 MutableIntList (org.eclipse.collections.api.list.primitive.MutableIntList)1 MutableLongList (org.eclipse.collections.api.list.primitive.MutableLongList)1 ImmutableDoubleSet (org.eclipse.collections.api.set.primitive.ImmutableDoubleSet)1 ImmutableIntSet (org.eclipse.collections.api.set.primitive.ImmutableIntSet)1 ImmutableLongSet (org.eclipse.collections.api.set.primitive.ImmutableLongSet)1 MutableDoubleSet (org.eclipse.collections.api.set.primitive.MutableDoubleSet)1 MutableIntSet (org.eclipse.collections.api.set.primitive.MutableIntSet)1