Пример #1
0
 /** {@inheritDoc} */
 public void fill(int fromIndex, int toIndex, byte val) {
   if (toIndex > _pos) {
     ensureCapacity(toIndex);
     _pos = toIndex;
   }
   Arrays.fill(_data, fromIndex, toIndex, val);
 }
Пример #2
0
 /** {@inheritDoc} */
 public void fill(byte val) {
   Arrays.fill(_data, 0, _pos, val);
 }
Пример #3
0
 /**
  * Sets the size of the list to 0, but does not change its capacity. This method can be used as an
  * alternative to the {@link #clear()} method if you want to recycle a list without allocating new
  * backing arrays.
  */
 public void reset() {
   _pos = 0;
   Arrays.fill(_data, no_entry_value);
 }