use of org.eclipse.collections.api.tuple.primitive.CharCharPair in project eclipse-collections by eclipse.
the class CharAdapter method zipChar.
/**
* @since 9.1.
*/
@Override
public ImmutableList<CharCharPair> zipChar(CharIterable iterable) {
int size = this.size();
int othersize = iterable.size();
MutableList<CharCharPair> target = Lists.mutable.withInitialCapacity(Math.min(size, othersize));
CharIterator iterator = iterable.charIterator();
for (int i = 0; i < size && i < othersize; i++) {
target.add(PrimitiveTuples.pair(this.get(i), iterator.next()));
}
return target.toImmutable();
}
Aggregations