The list of methods to do Array Fill are organized into topic(s).
T[]
fill( T[] a, T val) Assigns the specified T reference
val to each element of the array
a.
Arrays.fill(a, val);
return a;
List
fill(byte[] arr)
fill
List<Byte> list = null;
if (arr == null) {
return new ArrayList<Byte>(0);
int size = arr.length;
list = new ArrayList<Byte>(size);
for (byte by : arr) {
list.add(by);
...
byte[]
fill(byte[] val, byte b) fill
if (val == null)
throw new IllegalArgumentException("val should not be null");
Arrays.fill(val, b);
return val;
char[]
fill(char[] chars, int fromIndex, int toIndex, char c) fill
int length = toIndex - fromIndex;
if (length < 20) {
for (int i = fromIndex; i < toIndex; i++)
chars[i] = c;
} else if (c != ' ' || length > WHITESPACE_BUFFER.length) {
Arrays.fill(chars, fromIndex, toIndex, c);
} else {
System.arraycopy(WHITESPACE_BUFFER, 0, chars, fromIndex, length);
...
void
fill(final Object[] array, final int start, final int end, final Object value) Fill the specified segment of an array with the provided value.
assert start >= 0 && start <= end;
assert end <= array.length;
assert array.length == 0 || array.length == pow2(array.length);
final int n = LINE_SIZE;
int i = Math.min(n, end);
Arrays.fill(array, start, i, value);
while (i < end) {
System.arraycopy(array, i - n, array, i, n);
...