use of org.eclipse.collections.impl.list.mutable.primitive.ByteArrayList in project eclipse-collections by eclipse.
the class ImmutableByteMapKeySetTest method generateCollisions.
protected static ByteArrayList generateCollisions() {
ByteArrayList collisions = new ByteArrayList();
ImmutableByteMapKeySet set = (ImmutableByteMapKeySet) new ByteShortHashMap().keySet().freeze();
for (byte i = 2; collisions.size() <= 10; i++) {
if (set.spreadAndMask(i) == set.spreadAndMask((byte) 2)) {
collisions.add(i);
}
}
return collisions;
}
use of org.eclipse.collections.impl.list.mutable.primitive.ByteArrayList in project eclipse-collections by eclipse.
the class ArrayListAdapter method collectByte.
@Override
public MutableByteList collectByte(ByteFunction<? super T> byteFunction) {
ByteArrayList result = new ByteArrayList(this.size());
this.each(each -> result.add(byteFunction.byteValueOf(each)));
return result;
}
use of org.eclipse.collections.impl.list.mutable.primitive.ByteArrayList in project eclipse-collections by eclipse.
the class AbstractImmutableList method collectByte.
@Override
public ImmutableByteList collectByte(ByteFunction<? super T> byteFunction) {
ByteArrayList result = new ByteArrayList(this.size());
this.forEach(new CollectByteProcedure<>(byteFunction, result));
return result.toImmutable();
}
Aggregations