use of org.eclipse.collections.impl.list.mutable.primitive.ByteArrayList in project eclipse-collections by eclipse.
the class SortedSetAdapter method collectByte.
@Override
public MutableByteList collectByte(ByteFunction<? super T> byteFunction) {
ByteArrayList result = new ByteArrayList(this.size());
this.forEach(new CollectByteProcedure<>(byteFunction, result));
return result;
}
use of org.eclipse.collections.impl.list.mutable.primitive.ByteArrayList in project eclipse-collections by eclipse.
the class AbstractLazyIterableTestCase method collectByteWithTarget.
@Test
public void collectByteWithTarget() {
MutableByteCollection target = new ByteArrayList();
MutableByteCollection result = this.lazyIterable.collectByte(PrimitiveFunctions.unboxIntegerToByte(), target);
Assert.assertEquals(ByteArrayList.newListWith((byte) 1, (byte) 2, (byte) 3, (byte) 4, (byte) 5, (byte) 6, (byte) 7), result.toList());
Assert.assertSame("Target list sent as parameter not returned", target, result);
}
use of org.eclipse.collections.impl.list.mutable.primitive.ByteArrayList in project eclipse-collections by eclipse.
the class OrderedMapAdapter method collectByte.
@Override
public MutableByteList collectByte(ByteFunction<? super V> byteFunction) {
ByteArrayList result = new ByteArrayList(this.size());
this.forEach(new CollectByteProcedure<>(byteFunction, result));
return result;
}
use of org.eclipse.collections.impl.list.mutable.primitive.ByteArrayList in project eclipse-collections by eclipse.
the class RandomAccessListAdapter method collectByte.
@Override
public MutableByteList collectByte(ByteFunction<? super T> byteFunction) {
ByteArrayList result = new ByteArrayList(this.size());
this.forEach(new CollectByteProcedure<>(byteFunction, result));
return result;
}
use of org.eclipse.collections.impl.list.mutable.primitive.ByteArrayList in project eclipse-collections by eclipse.
the class AbstractMutableSortedMap method collectByte.
@Override
public MutableByteList collectByte(ByteFunction<? super V> byteFunction) {
ByteArrayList result = new ByteArrayList(this.size());
this.forEach(new CollectByteProcedure<>(byteFunction, result));
return result;
}
Aggregations