Search in sources :

Example 1 with ShortArrayList

use of org.eclipse.collections.impl.list.mutable.primitive.ShortArrayList in project eclipse-collections by eclipse.

the class TreeSortedSet method collectShort.

@Override
public MutableShortList collectShort(ShortFunction<? super T> shortFunction) {
    ShortArrayList result = new ShortArrayList(this.size());
    this.forEach(new CollectShortProcedure<>(shortFunction, result));
    return result;
}
Also used : ShortArrayList(org.eclipse.collections.impl.list.mutable.primitive.ShortArrayList)

Example 2 with ShortArrayList

use of org.eclipse.collections.impl.list.mutable.primitive.ShortArrayList in project eclipse-collections by eclipse.

the class AbstractImmutableSortedSet method collectShort.

@Override
public ImmutableShortList collectShort(ShortFunction<? super T> shortFunction) {
    ShortArrayList result = new ShortArrayList(this.size());
    this.forEach(new CollectShortProcedure<>(shortFunction, result));
    return result.toImmutable();
}
Also used : ShortArrayList(org.eclipse.collections.impl.list.mutable.primitive.ShortArrayList)

Example 3 with ShortArrayList

use of org.eclipse.collections.impl.list.mutable.primitive.ShortArrayList in project eclipse-collections by eclipse.

the class OrderedMapAdapter method collectShort.

@Override
public MutableShortList collectShort(ShortFunction<? super V> shortFunction) {
    ShortArrayList result = new ShortArrayList(this.size());
    this.forEach(new CollectShortProcedure<>(shortFunction, result));
    return result;
}
Also used : ShortArrayList(org.eclipse.collections.impl.list.mutable.primitive.ShortArrayList)

Example 4 with ShortArrayList

use of org.eclipse.collections.impl.list.mutable.primitive.ShortArrayList in project eclipse-collections by eclipse.

the class RandomAccessListAdapter method collectShort.

@Override
public MutableShortList collectShort(ShortFunction<? super T> shortFunction) {
    ShortArrayList result = new ShortArrayList(this.size());
    this.forEach(new CollectShortProcedure<>(shortFunction, result));
    return result;
}
Also used : ShortArrayList(org.eclipse.collections.impl.list.mutable.primitive.ShortArrayList)

Example 5 with ShortArrayList

use of org.eclipse.collections.impl.list.mutable.primitive.ShortArrayList in project eclipse-collections by eclipse.

the class ArrayListAdapter method collectShort.

@Override
public MutableShortList collectShort(ShortFunction<? super T> shortFunction) {
    ShortArrayList result = new ShortArrayList(this.size());
    this.each(each -> result.add(shortFunction.shortValueOf(each)));
    return result;
}
Also used : ShortArrayList(org.eclipse.collections.impl.list.mutable.primitive.ShortArrayList)

Aggregations

ShortArrayList (org.eclipse.collections.impl.list.mutable.primitive.ShortArrayList)20 Test (org.junit.Test)9 MutableShortCollection (org.eclipse.collections.api.collection.primitive.MutableShortCollection)3 MutableShortList (org.eclipse.collections.api.list.primitive.MutableShortList)3 ArrayList (java.util.ArrayList)2 BooleanArrayList (org.eclipse.collections.impl.list.mutable.primitive.BooleanArrayList)2 ByteArrayList (org.eclipse.collections.impl.list.mutable.primitive.ByteArrayList)2 CharArrayList (org.eclipse.collections.impl.list.mutable.primitive.CharArrayList)2 DoubleArrayList (org.eclipse.collections.impl.list.mutable.primitive.DoubleArrayList)2 FloatArrayList (org.eclipse.collections.impl.list.mutable.primitive.FloatArrayList)2 IntArrayList (org.eclipse.collections.impl.list.mutable.primitive.IntArrayList)2 LongArrayList (org.eclipse.collections.impl.list.mutable.primitive.LongArrayList)2 BigInteger (java.math.BigInteger)1 ShortIterable (org.eclipse.collections.api.ShortIterable)1 ShortHashBag (org.eclipse.collections.impl.bag.mutable.primitive.ShortHashBag)1 AbstractSentinelValues (org.eclipse.collections.impl.map.mutable.primitive.AbstractSentinelValues)1