java.util
Class Arrays

java.lang.Object
  extended by java.util.Arrays

public class Arrays
extends Object

Arrays contains static methods which operate on arrays.

Since:
1.2

Method Summary
static void fill(byte[] array, byte value)
          Fills the specified array with the specified element.
static void fill(byte[] array, int start, int end, byte value)
          Fills the specified range in the array with the specified element.
static void fill(char[] array, char value)
          Fills the specified array with the specified element.
static void fill(char[] array, int start, int end, char value)
          Fills the specified range in the array with the specified element.
static void fill(int[] array, int value)
          Fills the specified array with the specified element.
static void fill(int[] array, int start, int end, int value)
          Fills the specified range in the array with the specified element.
static void fill(Object[] array, int start, int end, Object value)
          Fills the specified range in the array with the specified element.
static void fill(Object[] array, Object value)
          Fills the specified array with the specified element.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, println, toString
 

Method Detail

fill

public static void fill(byte[] array,
                        byte value)
Fills the specified array with the specified element.

Parameters:
array - the byte array to fill
value - the byte element

fill

public static void fill(byte[] array,
                        int start,
                        int end,
                        byte value)
Fills the specified range in the array with the specified element.

Parameters:
array - the byte array to fill
start - the first index to fill
end - the last + 1 index to fill
value - the byte element
Throws:
IllegalArgumentException - when start > end
ArrayIndexOutOfBoundsException - when start < 0 or end > array.size()

fill

public static void fill(char[] array,
                        char value)
Fills the specified array with the specified element.

Parameters:
array - the char array to fill
value - the char element

fill

public static void fill(char[] array,
                        int start,
                        int end,
                        char value)
Fills the specified range in the array with the specified element.

Parameters:
array - the char array to fill
start - the first index to fill
end - the last + 1 index to fill
value - the char element
Throws:
IllegalArgumentException - when start > end
ArrayIndexOutOfBoundsException - when start < 0 or end > array.size()

fill

public static void fill(int[] array,
                        int value)
Fills the specified array with the specified element.

Parameters:
array - the int array to fill
value - the int element

fill

public static void fill(int[] array,
                        int start,
                        int end,
                        int value)
Fills the specified range in the array with the specified element.

Parameters:
array - the int array to fill
start - the first index to fill
end - the last + 1 index to fill
value - the int element
Throws:
IllegalArgumentException - when start > end
ArrayIndexOutOfBoundsException - when start < 0 or end > array.size()

fill

public static void fill(Object[] array,
                        Object value)
Fills the specified array with the specified element.

Parameters:
array - the Object array to fill
value - the Object element

fill

public static void fill(Object[] array,
                        int start,
                        int end,
                        Object value)
Fills the specified range in the array with the specified element.

Parameters:
array - the Object array to fill
start - the first index to fill
end - the last + 1 index to fill
value - the Object element
Throws:
IllegalArgumentException - when start > end
ArrayIndexOutOfBoundsException - when start < 0 or end > array.size()