padToInPlace method

Buffer<A> padToInPlace(
  1. int len,
  2. A elem
)

Appends elem until length equals len, then returns this.

Implementation

Buffer<A> padToInPlace(int len, A elem) {
  while (length < len) {
    addOne(elem);
  }

  return this;
}