List of utility methods to do Array Fill
String[] | fillArray(String[] array, int size, String fillString) fill Array if (array == null) { return null; String[] fillArray = new String[size]; for (int index = 0; index < fillArray.length; index++) { String fillValue = fillString; if (index < array.length) { fillValue = array[index]; ... |
void | fillArray(T[] arr, T val) Fill given array with given repeated value if (arr != null) for (int i = 0; i < arr.length; i++) arr[i] = val; |
void | fillArray2D(double[][] arr, double value) fill Array D for (int i = 0; i < arr.length; i++) { double[] col = arr[i]; Arrays.fill(col, value); |
void | fillArrayWith(byte[] dest, byte[] pattern) fill Array With int count = 0; while (count < dest.length) { for (int i = 0; i < pattern.length; i++) { dest[count] = pattern[i]; count++; |
void | fillArrayWithByte(byte[] array, byte value) fill Array With Byte for (int i = 0; i < array.length; i++) array[i] = value; |
void | fillArrayWithHalfSorted(int[] nums) fill Array With Half Sorted for (int i = 0; i < nums.length / 2; i++) nums[i] = i; int start = nums.length; for (int i = nums.length / 2; i < nums.length; i++) nums[i] = start--; |
void | fillColor(int[][] dist) fill Color int white = 0xff << 24; for (int i = 0; i < dist.length; i++) { Arrays.fill(dist[i], white); |
int[] | filledIntArray(int length, int cont) filled Int Array int[] res = new int[length]; Arrays.fill(res, cont); return res; |