Package org.apache.commons.lang3
Class ArrayFill
- java.lang.Object
-
- org.apache.commons.lang3.ArrayFill
-
public final class ArrayFill extends java.lang.Object
Fills and returns arrays in the fluent style.- Since:
- 3.14.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
fill(byte[] a, byte val)
Fills and returns the given array.static char[]
fill(char[] a, char val)
Fills and returns the given array.static double[]
fill(double[] a, double val)
Fills and returns the given array.static float[]
fill(float[] a, float val)
Fills and returns the given array.static int[]
fill(int[] a, int val)
Fills and returns the given array.static long[]
fill(long[] a, long val)
Fills and returns the given array.static short[]
fill(short[] a, short val)
Fills and returns the given array.static <T> T[]
fill(T[] a, T val)
Fills and returns the given array.
-
-
-
Method Detail
-
fill
public static byte[] fill(byte[] a, byte val)
Fills and returns the given array.- Parameters:
a
- the array to be filled.val
- the value to be stored in all elements of the array.- Returns:
- the given array.
- See Also:
Arrays.fill(byte[],byte)
-
fill
public static char[] fill(char[] a, char val)
Fills and returns the given array.- Parameters:
a
- the array to be filled.val
- the value to be stored in all elements of the array.- Returns:
- the given array.
- See Also:
Arrays.fill(char[],char)
-
fill
public static double[] fill(double[] a, double val)
Fills and returns the given array.- Parameters:
a
- the array to be filled.val
- the value to be stored in all elements of the array.- Returns:
- the given array.
- See Also:
Arrays.fill(double[],double)
-
fill
public static float[] fill(float[] a, float val)
Fills and returns the given array.- Parameters:
a
- the array to be filled.val
- the value to be stored in all elements of the array.- Returns:
- the given array.
- See Also:
Arrays.fill(float[],float)
-
fill
public static int[] fill(int[] a, int val)
Fills and returns the given array.- Parameters:
a
- the array to be filled.val
- the value to be stored in all elements of the array.- Returns:
- the given array.
- See Also:
Arrays.fill(int[],int)
-
fill
public static long[] fill(long[] a, long val)
Fills and returns the given array.- Parameters:
a
- the array to be filled.val
- the value to be stored in all elements of the array.- Returns:
- the given array.
- See Also:
Arrays.fill(long[],long)
-
fill
public static short[] fill(short[] a, short val)
Fills and returns the given array.- Parameters:
a
- the array to be filled.val
- the value to be stored in all elements of the array.- Returns:
- the given array.
- See Also:
Arrays.fill(short[],short)
-
fill
public static <T> T[] fill(T[] a, T val)
Fills and returns the given array.- Type Parameters:
T
- the array type.- Parameters:
a
- the array to be filled.val
- the value to be stored in all elements of the array.- Returns:
- the given array.
- See Also:
Arrays.fill(Object[],Object)
-
-