mirror of
https://github.com/corda/corda.git
synced 2025-01-06 05:04:20 +00:00
Implement rest of the Arrays#fill family
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
parent
6a81623690
commit
1ed90c38ab
@ -343,7 +343,43 @@ public class Arrays {
|
||||
array[i] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void fill(short[] array, short value) {
|
||||
for (int i=0;i<array.length;i++) {
|
||||
array[i] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public static void fill(byte[] array, byte value) {
|
||||
for (int i=0;i<array.length;i++) {
|
||||
array[i] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public static void fill(boolean[] array, boolean value) {
|
||||
for (int i=0;i<array.length;i++) {
|
||||
array[i] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public static void fill(long[] array, long value) {
|
||||
for (int i=0;i<array.length;i++) {
|
||||
array[i] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public static void fill(float[] array, float value) {
|
||||
for (int i=0;i<array.length;i++) {
|
||||
array[i] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public static void fill(double[] array, double value) {
|
||||
for (int i=0;i<array.length;i++) {
|
||||
array[i] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public static <T> void fill(T[] array, T value) {
|
||||
for (int i=0;i<array.length;i++) {
|
||||
array[i] = value;
|
||||
|
Loading…
Reference in New Issue
Block a user