Search in sources :

Example 6 with MutableIntCollection

use of org.eclipse.collections.api.collection.primitive.MutableIntCollection in project eclipse-collections by eclipse.

the class AbstractRichIterableTestCase method collectIntWithTarget.

@Test
public void collectIntWithTarget() {
    MutableIntCollection target = new IntArrayList();
    IntIterable result = this.newWith(1, 2, 3, 4).collectInt(PrimitiveFunctions.unboxIntegerToInt(), target);
    Assert.assertSame("Target list sent as parameter not returned", target, result);
    Assert.assertEquals(IntHashBag.newBagWith(1, 2, 3, 4), result.toBag());
}
Also used : MutableIntCollection(org.eclipse.collections.api.collection.primitive.MutableIntCollection) IntArrayList(org.eclipse.collections.impl.list.mutable.primitive.IntArrayList) IntIterable(org.eclipse.collections.api.IntIterable) Test(org.junit.Test)

Example 7 with MutableIntCollection

use of org.eclipse.collections.api.collection.primitive.MutableIntCollection in project eclipse-collections by eclipse.

the class IterateTest method collectInt.

@Test
public void collectInt() {
    this.iterables.each(each -> {
        MutableIntCollection result = Iterate.collectInt(each, PrimitiveFunctions.unboxIntegerToInt());
        Assert.assertTrue(result.containsAll(1, 2, 3, 4, 5));
    });
    Verify.assertThrows(IllegalArgumentException.class, () -> Iterate.collectInt(null, PrimitiveFunctions.unboxIntegerToInt()));
}
Also used : MutableIntCollection(org.eclipse.collections.api.collection.primitive.MutableIntCollection) Test(org.junit.Test)

Example 8 with MutableIntCollection

use of org.eclipse.collections.api.collection.primitive.MutableIntCollection in project eclipse-collections by eclipse.

the class MapIterateTest method collectInt.

@Test
public void collectInt() {
    MutableIntCollection result = MapIterate.collectInt(MapIterateTest.newLittleMap(), PrimitiveFunctions.unboxIntegerToInt());
    Assert.assertEquals(IntHashBag.newBagWith(1, 2), result.toBag());
}
Also used : MutableIntCollection(org.eclipse.collections.api.collection.primitive.MutableIntCollection) Test(org.junit.Test)

Example 9 with MutableIntCollection

use of org.eclipse.collections.api.collection.primitive.MutableIntCollection in project eclipse-collections by eclipse.

the class RichIterableTestCase method RichIterable_collectPrimitive.

@Test
default void RichIterable_collectPrimitive() {
    assertEquals(this.getExpectedBoolean(false, false, true, true, false, false), this.newWith(3, 3, 2, 2, 1, 1).collectBoolean(each -> each % 2 == 0));
    {
        MutableBooleanCollection target = this.newBooleanForTransform();
        MutableBooleanCollection result = this.newWith(3, 3, 2, 2, 1, 1).collectBoolean(each -> each % 2 == 0, target);
        assertEquals(this.newBooleanForTransform(false, false, true, true, false, false), result);
        assertSame(target, result);
    }
    RichIterable<Integer> iterable = this.newWith(13, 13, 12, 12, 11, 11, 3, 3, 2, 2, 1, 1);
    assertEquals(this.getExpectedByte((byte) 3, (byte) 3, (byte) 2, (byte) 2, (byte) 1, (byte) 1, (byte) 3, (byte) 3, (byte) 2, (byte) 2, (byte) 1, (byte) 1), iterable.collectByte(each -> (byte) (each % 10)));
    {
        MutableByteCollection target = this.newByteForTransform();
        MutableByteCollection result = iterable.collectByte(each -> (byte) (each % 10), target);
        assertEquals(this.newByteForTransform((byte) 3, (byte) 3, (byte) 2, (byte) 2, (byte) 1, (byte) 1, (byte) 3, (byte) 3, (byte) 2, (byte) 2, (byte) 1, (byte) 1), result);
        assertSame(target, result);
    }
    assertEquals(this.getExpectedChar((char) 3, (char) 3, (char) 2, (char) 2, (char) 1, (char) 1, (char) 3, (char) 3, (char) 2, (char) 2, (char) 1, (char) 1), iterable.collectChar(each -> (char) (each % 10)));
    {
        MutableCharCollection target = this.newCharForTransform();
        MutableCharCollection result = iterable.collectChar(each -> (char) (each % 10), target);
        assertEquals(this.newCharForTransform((char) 3, (char) 3, (char) 2, (char) 2, (char) 1, (char) 1, (char) 3, (char) 3, (char) 2, (char) 2, (char) 1, (char) 1), result);
        assertSame(target, result);
    }
    assertEquals(this.getExpectedDouble(3.0, 3.0, 2.0, 2.0, 1.0, 1.0, 3.0, 3.0, 2.0, 2.0, 1.0, 1.0), iterable.collectDouble(each -> (double) (each % 10)));
    {
        MutableDoubleCollection target = this.newDoubleForTransform();
        MutableDoubleCollection result = iterable.collectDouble(each -> (double) (each % 10), target);
        assertEquals(this.newDoubleForTransform(3.0, 3.0, 2.0, 2.0, 1.0, 1.0, 3.0, 3.0, 2.0, 2.0, 1.0, 1.0), result);
        assertSame(target, result);
    }
    assertEquals(this.getExpectedFloat(3.0f, 3.0f, 2.0f, 2.0f, 1.0f, 1.0f, 3.0f, 3.0f, 2.0f, 2.0f, 1.0f, 1.0f), iterable.collectFloat(each -> (float) (each % 10)));
    {
        MutableFloatCollection target = this.newFloatForTransform();
        MutableFloatCollection result = iterable.collectFloat(each -> (float) (each % 10), target);
        assertEquals(this.newFloatForTransform(3.0f, 3.0f, 2.0f, 2.0f, 1.0f, 1.0f, 3.0f, 3.0f, 2.0f, 2.0f, 1.0f, 1.0f), result);
        assertSame(target, result);
    }
    assertEquals(this.getExpectedInt(3, 3, 2, 2, 1, 1, 3, 3, 2, 2, 1, 1), iterable.collectInt(each -> each % 10));
    {
        MutableIntCollection target = this.newIntForTransform();
        MutableIntCollection result = iterable.collectInt(each -> each % 10, target);
        assertEquals(this.newIntForTransform(3, 3, 2, 2, 1, 1, 3, 3, 2, 2, 1, 1), result);
        assertSame(target, result);
    }
    assertEquals(this.getExpectedLong(3, 3, 2, 2, 1, 1, 3, 3, 2, 2, 1, 1), iterable.collectLong(each -> each % 10));
    {
        MutableLongCollection target = this.newLongForTransform();
        MutableLongCollection result = iterable.collectLong(each -> each % 10, target);
        assertEquals(this.newLongForTransform(3, 3, 2, 2, 1, 1, 3, 3, 2, 2, 1, 1), result);
        assertSame(target, result);
    }
    assertEquals(this.getExpectedShort((short) 3, (short) 3, (short) 2, (short) 2, (short) 1, (short) 1, (short) 3, (short) 3, (short) 2, (short) 2, (short) 1, (short) 1), iterable.collectShort(each -> (short) (each % 10)));
    MutableShortCollection target = this.newShortForTransform();
    MutableShortCollection result = iterable.collectShort(each -> (short) (each % 10), target);
    assertEquals(this.newShortForTransform((short) 3, (short) 3, (short) 2, (short) 2, (short) 1, (short) 1, (short) 3, (short) 3, (short) 2, (short) 2, (short) 1, (short) 1), result);
    assertSame(target, result);
}
Also used : CharHashBag(org.eclipse.collections.impl.bag.mutable.primitive.CharHashBag) Predicate(org.eclipse.collections.api.block.predicate.Predicate) Multimap(org.eclipse.collections.api.multimap.Multimap) Predicate2(org.eclipse.collections.api.block.predicate.Predicate2) MutableBag(org.eclipse.collections.api.bag.MutableBag) MutableList(org.eclipse.collections.api.list.MutableList) LongObjectToLongFunction(org.eclipse.collections.api.block.function.primitive.LongObjectToLongFunction) Assert.assertThat(org.junit.Assert.assertThat) DoubleObjectToDoubleFunction(org.eclipse.collections.api.block.function.primitive.DoubleObjectToDoubleFunction) RichIterable(org.eclipse.collections.api.RichIterable) MutableLongCollection(org.eclipse.collections.api.collection.primitive.MutableLongCollection) HashBag(org.eclipse.collections.impl.bag.mutable.HashBag) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Functions(org.eclipse.collections.impl.block.factory.Functions) Map(java.util.Map) Matchers.nullValue(org.hamcrest.Matchers.nullValue) LongIterable(org.eclipse.collections.api.LongIterable) MutableMultimap(org.eclipse.collections.api.multimap.MutableMultimap) Tuples(org.eclipse.collections.impl.tuple.Tuples) Interval(org.eclipse.collections.impl.list.Interval) Assert.fail(org.junit.Assert.fail) ShortFunction(org.eclipse.collections.api.block.function.primitive.ShortFunction) ShortHashBag(org.eclipse.collections.impl.bag.mutable.primitive.ShortHashBag) Comparators(org.eclipse.collections.impl.block.factory.Comparators) MutableCharCollection(org.eclipse.collections.api.collection.primitive.MutableCharCollection) DoubleHashBag(org.eclipse.collections.impl.bag.mutable.primitive.DoubleHashBag) UnifiedMap(org.eclipse.collections.impl.map.mutable.UnifiedMap) Matchers.isOneOf(org.hamcrest.Matchers.isOneOf) MutableIntCollection(org.eclipse.collections.api.collection.primitive.MutableIntCollection) IntObjectToIntFunction(org.eclipse.collections.api.block.function.primitive.IntObjectToIntFunction) ByteHashBag(org.eclipse.collections.impl.bag.mutable.primitive.ByteHashBag) BooleanHashBag(org.eclipse.collections.impl.bag.mutable.primitive.BooleanHashBag) Procedures(org.eclipse.collections.impl.block.factory.Procedures) Collectors(java.util.stream.Collectors) CharIterable(org.eclipse.collections.api.CharIterable) Objects(java.util.Objects) List(java.util.List) DoubleIterable(org.eclipse.collections.api.DoubleIterable) Lists(org.eclipse.collections.impl.factory.Lists) ObjectDoubleMaps(org.eclipse.collections.impl.factory.primitive.ObjectDoubleMaps) Assert.assertFalse(org.junit.Assert.assertFalse) Optional(java.util.Optional) MutableByteCollection(org.eclipse.collections.api.collection.primitive.MutableByteCollection) Matchers.is(org.hamcrest.Matchers.is) FloatIterable(org.eclipse.collections.api.FloatIterable) Function(org.eclipse.collections.api.block.function.Function) IntIterable(org.eclipse.collections.api.IntIterable) IterableTestCase.assertEquals(org.eclipse.collections.test.IterableTestCase.assertEquals) Bag(org.eclipse.collections.api.bag.Bag) MutableShortCollection(org.eclipse.collections.api.collection.primitive.MutableShortCollection) Procedure(org.eclipse.collections.api.block.procedure.Procedure) LongHashBag(org.eclipse.collections.impl.bag.mutable.primitive.LongHashBag) Verify.assertThrows(org.eclipse.collections.impl.test.Verify.assertThrows) Assert.assertSame(org.junit.Assert.assertSame) IterableTestCase.assertNotEquals(org.eclipse.collections.test.IterableTestCase.assertNotEquals) MutableMap(org.eclipse.collections.api.map.MutableMap) HashBagMultimap(org.eclipse.collections.impl.multimap.bag.HashBagMultimap) Function2(org.eclipse.collections.api.block.function.Function2) TreeBag(org.eclipse.collections.impl.bag.sorted.mutable.TreeBag) ByteIterable(org.eclipse.collections.api.ByteIterable) ImmutableBag(org.eclipse.collections.api.bag.ImmutableBag) NoSuchElementException(java.util.NoSuchElementException) FloatObjectToFloatFunction(org.eclipse.collections.api.block.function.primitive.FloatObjectToFloatFunction) Pair(org.eclipse.collections.api.tuple.Pair) MutableCollection(org.eclipse.collections.api.collection.MutableCollection) Predicates(org.eclipse.collections.impl.block.factory.Predicates) Counter(org.eclipse.collections.impl.Counter) Predicates2(org.eclipse.collections.impl.block.factory.Predicates2) Collectors2(org.eclipse.collections.impl.collector.Collectors2) MutableFloatCollection(org.eclipse.collections.api.collection.primitive.MutableFloatCollection) Iterator(java.util.Iterator) BooleanIterable(org.eclipse.collections.api.BooleanIterable) IntegerPredicates(org.eclipse.collections.impl.block.factory.IntegerPredicates) ShortIterable(org.eclipse.collections.api.ShortIterable) MutableDoubleCollection(org.eclipse.collections.api.collection.primitive.MutableDoubleCollection) SortedSets(org.eclipse.collections.impl.factory.SortedSets) Bags(org.eclipse.collections.impl.factory.Bags) ObjectLongMaps(org.eclipse.collections.impl.factory.primitive.ObjectLongMaps) TreeSortedMap(org.eclipse.collections.impl.map.sorted.mutable.TreeSortedMap) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) MutableBooleanCollection(org.eclipse.collections.api.collection.primitive.MutableBooleanCollection) Assert.assertNull(org.junit.Assert.assertNull) Sets(org.eclipse.collections.impl.factory.Sets) MapIterable(org.eclipse.collections.api.map.MapIterable) PartitionIterable(org.eclipse.collections.api.partition.PartitionIterable) AddFunction(org.eclipse.collections.impl.block.function.AddFunction) FloatHashBag(org.eclipse.collections.impl.bag.mutable.primitive.FloatHashBag) Assert(org.junit.Assert) IntHashBag(org.eclipse.collections.impl.bag.mutable.primitive.IntHashBag) MutableBooleanCollection(org.eclipse.collections.api.collection.primitive.MutableBooleanCollection) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) MutableCharCollection(org.eclipse.collections.api.collection.primitive.MutableCharCollection) MutableIntCollection(org.eclipse.collections.api.collection.primitive.MutableIntCollection) MutableShortCollection(org.eclipse.collections.api.collection.primitive.MutableShortCollection) MutableFloatCollection(org.eclipse.collections.api.collection.primitive.MutableFloatCollection) MutableDoubleCollection(org.eclipse.collections.api.collection.primitive.MutableDoubleCollection) MutableLongCollection(org.eclipse.collections.api.collection.primitive.MutableLongCollection) MutableByteCollection(org.eclipse.collections.api.collection.primitive.MutableByteCollection) Test(org.junit.Test)

Example 10 with MutableIntCollection

use of org.eclipse.collections.api.collection.primitive.MutableIntCollection in project eclipse-collections by eclipse.

the class RichIterableUniqueTestCase method RichIterable_collectPrimitive.

@Override
@Test
default void RichIterable_collectPrimitive() {
    assertEquals(this.getExpectedBoolean(false, true, false), this.newWith(3, 2, 1).collectBoolean(each -> each % 2 == 0));
    {
        MutableBooleanCollection target = this.newBooleanForTransform();
        MutableBooleanCollection result = this.newWith(3, 2, 1).collectBoolean(each -> each % 2 == 0, target);
        assertEquals(this.getExpectedBoolean(false, true, false), result);
        assertSame(target, result);
    }
    RichIterable<Integer> iterable = this.newWith(13, 12, 11, 3, 2, 1);
    assertEquals(this.getExpectedByte((byte) 3, (byte) 2, (byte) 1, (byte) 3, (byte) 2, (byte) 1), iterable.collectByte(each -> (byte) (each % 10)));
    {
        MutableByteCollection target = this.newByteForTransform();
        MutableByteCollection result = iterable.collectByte(each -> (byte) (each % 10), target);
        assertEquals(this.getExpectedByte((byte) 3, (byte) 2, (byte) 1, (byte) 3, (byte) 2, (byte) 1), result);
        assertSame(target, result);
    }
    assertEquals(this.getExpectedChar((char) 3, (char) 2, (char) 1, (char) 3, (char) 2, (char) 1), iterable.collectChar(each -> (char) (each % 10)));
    {
        MutableCharCollection target = this.newCharForTransform();
        MutableCharCollection result = iterable.collectChar(each -> (char) (each % 10), target);
        assertEquals(this.getExpectedChar((char) 3, (char) 2, (char) 1, (char) 3, (char) 2, (char) 1), result);
        assertSame(target, result);
    }
    assertEquals(this.getExpectedDouble(3.0, 2.0, 1.0, 3.0, 2.0, 1.0), iterable.collectDouble(each -> (double) (each % 10)));
    {
        MutableDoubleCollection target = this.newDoubleForTransform();
        MutableDoubleCollection result = iterable.collectDouble(each -> (double) (each % 10), target);
        assertEquals(this.getExpectedDouble(3.0, 2.0, 1.0, 3.0, 2.0, 1.0), result);
        assertSame(target, result);
    }
    assertEquals(this.getExpectedFloat(3.0f, 2.0f, 1.0f, 3.0f, 2.0f, 1.0f), iterable.collectFloat(each -> (float) (each % 10)));
    {
        MutableFloatCollection target = this.newFloatForTransform();
        MutableFloatCollection result = iterable.collectFloat(each -> (float) (each % 10), target);
        assertEquals(this.getExpectedFloat(3.0f, 2.0f, 1.0f, 3.0f, 2.0f, 1.0f), result);
        assertSame(target, result);
    }
    assertEquals(this.getExpectedInt(3, 2, 1, 3, 2, 1), iterable.collectInt(each -> each % 10));
    {
        MutableIntCollection target = this.newIntForTransform();
        MutableIntCollection result = iterable.collectInt(each -> each % 10, target);
        assertEquals(this.getExpectedInt(3, 2, 1, 3, 2, 1), result);
        assertSame(target, result);
    }
    assertEquals(this.getExpectedLong(3, 2, 1, 3, 2, 1), iterable.collectLong(each -> each % 10));
    {
        MutableLongCollection target = this.newLongForTransform();
        MutableLongCollection result = iterable.collectLong(each -> each % 10, target);
        assertEquals(this.getExpectedLong(3, 2, 1, 3, 2, 1), result);
        assertSame(target, result);
    }
    assertEquals(this.getExpectedShort((short) 3, (short) 2, (short) 1, (short) 3, (short) 2, (short) 1), iterable.collectShort(each -> (short) (each % 10)));
    MutableShortCollection target = this.newShortForTransform();
    MutableShortCollection result = iterable.collectShort(each -> (short) (each % 10), target);
    assertEquals(this.getExpectedShort((short) 3, (short) 2, (short) 1, (short) 3, (short) 2, (short) 1), result);
    assertSame(target, result);
}
Also used : Multimap(org.eclipse.collections.api.multimap.Multimap) MutableBag(org.eclipse.collections.api.bag.MutableBag) MutableList(org.eclipse.collections.api.list.MutableList) RichIterable(org.eclipse.collections.api.RichIterable) MutableLongCollection(org.eclipse.collections.api.collection.primitive.MutableLongCollection) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Functions(org.eclipse.collections.impl.block.factory.Functions) Map(java.util.Map) MutableMultimap(org.eclipse.collections.api.multimap.MutableMultimap) Tuples(org.eclipse.collections.impl.tuple.Tuples) Interval(org.eclipse.collections.impl.list.Interval) Assert.fail(org.junit.Assert.fail) Comparators(org.eclipse.collections.impl.block.factory.Comparators) MutableCharCollection(org.eclipse.collections.api.collection.primitive.MutableCharCollection) UnifiedMap(org.eclipse.collections.impl.map.mutable.UnifiedMap) MutableIntCollection(org.eclipse.collections.api.collection.primitive.MutableIntCollection) Procedures(org.eclipse.collections.impl.block.factory.Procedures) Collectors(java.util.stream.Collectors) List(java.util.List) Lists(org.eclipse.collections.impl.factory.Lists) ObjectDoubleMaps(org.eclipse.collections.impl.factory.primitive.ObjectDoubleMaps) Verify.assertPostSerializedEqualsAndHashCode(org.eclipse.collections.impl.test.Verify.assertPostSerializedEqualsAndHashCode) Optional(java.util.Optional) MutableByteCollection(org.eclipse.collections.api.collection.primitive.MutableByteCollection) Function(org.eclipse.collections.api.block.function.Function) IterableTestCase.assertEquals(org.eclipse.collections.test.IterableTestCase.assertEquals) MutableShortCollection(org.eclipse.collections.api.collection.primitive.MutableShortCollection) Procedure(org.eclipse.collections.api.block.procedure.Procedure) Verify.assertThrows(org.eclipse.collections.impl.test.Verify.assertThrows) Assert.assertSame(org.junit.Assert.assertSame) IterableTestCase.assertNotEquals(org.eclipse.collections.test.IterableTestCase.assertNotEquals) MutableMap(org.eclipse.collections.api.map.MutableMap) Function2(org.eclipse.collections.api.block.function.Function2) Assert.assertArrayEquals(org.junit.Assert.assertArrayEquals) TreeBag(org.eclipse.collections.impl.bag.sorted.mutable.TreeBag) ImmutableBag(org.eclipse.collections.api.bag.ImmutableBag) SerializeTestHelper(org.eclipse.collections.impl.test.SerializeTestHelper) Pair(org.eclipse.collections.api.tuple.Pair) MutableCollection(org.eclipse.collections.api.collection.MutableCollection) Predicates2(org.eclipse.collections.impl.block.factory.Predicates2) MutableFloatCollection(org.eclipse.collections.api.collection.primitive.MutableFloatCollection) IntegerPredicates(org.eclipse.collections.impl.block.factory.IntegerPredicates) MutableDoubleCollection(org.eclipse.collections.api.collection.primitive.MutableDoubleCollection) SortedSets(org.eclipse.collections.impl.factory.SortedSets) Bags(org.eclipse.collections.impl.factory.Bags) ObjectLongMaps(org.eclipse.collections.impl.factory.primitive.ObjectLongMaps) TreeSortedMap(org.eclipse.collections.impl.map.sorted.mutable.TreeSortedMap) Test(org.junit.Test) MutableBooleanCollection(org.eclipse.collections.api.collection.primitive.MutableBooleanCollection) Sets(org.eclipse.collections.impl.factory.Sets) MapIterable(org.eclipse.collections.api.map.MapIterable) PartitionIterable(org.eclipse.collections.api.partition.PartitionIterable) AddFunction(org.eclipse.collections.impl.block.function.AddFunction) Assert(org.junit.Assert) MutableBooleanCollection(org.eclipse.collections.api.collection.primitive.MutableBooleanCollection) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) MutableCharCollection(org.eclipse.collections.api.collection.primitive.MutableCharCollection) MutableIntCollection(org.eclipse.collections.api.collection.primitive.MutableIntCollection) MutableShortCollection(org.eclipse.collections.api.collection.primitive.MutableShortCollection) MutableFloatCollection(org.eclipse.collections.api.collection.primitive.MutableFloatCollection) MutableDoubleCollection(org.eclipse.collections.api.collection.primitive.MutableDoubleCollection) MutableLongCollection(org.eclipse.collections.api.collection.primitive.MutableLongCollection) MutableByteCollection(org.eclipse.collections.api.collection.primitive.MutableByteCollection) Test(org.junit.Test)

Aggregations

MutableIntCollection (org.eclipse.collections.api.collection.primitive.MutableIntCollection)10 Test (org.junit.Test)9 MutableBooleanCollection (org.eclipse.collections.api.collection.primitive.MutableBooleanCollection)4 MutableByteCollection (org.eclipse.collections.api.collection.primitive.MutableByteCollection)4 MutableCharCollection (org.eclipse.collections.api.collection.primitive.MutableCharCollection)4 MutableDoubleCollection (org.eclipse.collections.api.collection.primitive.MutableDoubleCollection)4 MutableFloatCollection (org.eclipse.collections.api.collection.primitive.MutableFloatCollection)4 MutableLongCollection (org.eclipse.collections.api.collection.primitive.MutableLongCollection)4 MutableShortCollection (org.eclipse.collections.api.collection.primitive.MutableShortCollection)4 Optional (java.util.Optional)3 RichIterable (org.eclipse.collections.api.RichIterable)3 MutableCollection (org.eclipse.collections.api.collection.MutableCollection)3 MutableList (org.eclipse.collections.api.list.MutableList)3 Pair (org.eclipse.collections.api.tuple.Pair)3 Predicates2 (org.eclipse.collections.impl.block.factory.Predicates2)3 Lists (org.eclipse.collections.impl.factory.Lists)3 List (java.util.List)2 Map (java.util.Map)2 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)2 Collectors (java.util.stream.Collectors)2