Java Utililty Methods Array Fill

List of utility methods to do Array Fill

Description

The list of methods to do Array Fill are organized into topic(s).

Method

voidfill(int[][] array, int value)
fill
for (int[] subarray : array)
    Arrays.fill(subarray, value);
voidfill(String[] ary, String value)
fill
if (!isEmplyOrNull(ary)) {
    for (int i = 0; i < ary.length; i++) {
        ary[i] = value;
T[][][]fill(T[][][] arr, T val)
Fills array with specified object.
for (T[][] i : arr) {
    for (T[] j : i) {
        Arrays.fill(j, val);
return arr;
voidfillArray(byte[] btArray, byte[] btValue, int iStartPosition, int iLength, byte btAlternateValue, int iAlign)
fill Array
int iFillLength = btValue.length;
if (iFillLength > iLength)
    iFillLength = iLength;
int iAlternateLength = iLength - iFillLength;
if (iAlign == ALIGN_RIGHT) {
    int iDataPosition = iStartPosition + iAlternateLength;
    Arrays.fill(btArray, iStartPosition, iDataPosition, btAlternateValue);
    System.arraycopy(btValue, 0, btArray, iDataPosition, iFillLength);
...
byte[]fillArray(byte[] data)
fill Array
Arrays.fill(data, (byte) 85);
return data;
voidfillArray(char[] array, int offset, char value)
Fills part of the array with a value.
int to = array.length;
while (--to >= offset) {
    array[to] = value;
double[][][]fillArray(double[][][] array, double[] value, int rows, int columns)
Fill an array with translation values
array = new double[columns][rows][2];
for (int i = 0; i < rows; i++) {
    for (int j = 0; j < columns; j++) {
        array[j][i] = value;
return array;
voidfillArray(final float[] array, final float value)
fill Array
int len = array.length;
if (len > 0) {
    array[0] = value;
for (int i = 1; i < len; i += i) {
    System.arraycopy(array, 0, array, i, ((len - i) < i) ? (len - i) : i);
float[]fillArray(float filling, int length)
fill Array
float[] fArray = new float[length];
for (int i = 0; i < length; i++) {
    fArray[i] = filling;
return fArray;
voidfillArray(float[] batchVertices, float f)
fill Array
Arrays.fill(batchVertices, f);