public class RMArrayUtils
extends java.lang.Object
Constructor and Description |
---|
RMArrayUtils() |
Modifier and Type | Method and Description |
---|---|
static char[] |
add(char[] array,
char value)
Adds a char value to a char array.
|
static char[] |
add(char[] array,
char value,
int index)
Adds a char value to a char array at the given index.
|
static int[] |
add(int[] array,
int value)
Adds an int value to an int array.
|
static int[] |
add(int[] array,
int value,
int index)
Adds an int value to an int array at the given index.
|
static int[] |
addIfAbsent(int[] array,
int value)
Adds an int value to an int array at the given index if value is absent from array.
|
static boolean[] |
clone(boolean[] array)
Clones a boolean array.
|
static byte[] |
clone(byte[] array)
Clones a byte array.
|
static float[] |
clone(float[] array)
Clones a float array.
|
static int[] |
clone(int[] array)
Clones an int array.
|
static boolean |
contains(java.lang.Object[] anArray,
java.lang.Object anObj)
Returns whether the given array contains the given object.
|
static boolean |
containsIC(java.lang.Object[] anArray,
java.lang.Object anObj)
Returns whether the given array contains the given object (assuming strings and case insensitive).
|
static boolean |
equals(byte[] array1,
byte[] array2)
Returns whether two byte arrays are equal.
|
static boolean |
equals(byte[] array1,
byte[] array2,
int length)
Returns whether two byte arrays are equal to the given length.
|
static boolean |
equals(float[] array1,
float[] array2)
Returns whether two float arrays are equal.
|
static boolean |
equals(int[] array1,
int[] array2)
Returns whether two boolean arrays are equal.
|
static int |
indexOf(java.lang.Object[] anArray,
java.lang.Object anObj)
Returns the index of the given object in the given array.
|
static int |
indexOfIC(java.lang.Object[] anArray,
java.lang.Object anObj)
Returns the index of the given object in the given array (assuming strings and ignoring case).
|
static byte[] |
realloc(byte[] array,
int size)
Creates a new byte array with original values and new size.
|
static int[] |
realloc(int[] array,
int size)
Creates a new int array with original values and new size.
|
static java.lang.Object[] |
realloc(java.lang.Object[] array,
int size)
Creates a new object array with original values and new size.
|
static int[] |
remove(int[] a,
int anIndex)
Removes an int value from an int array.
|
static int[] |
remove(int[] a,
int start,
int end)
Removes a range of values from an int array.
|
static int[] |
replace(int[] array,
int start,
int end,
int[] replacement)
Replaces a range of values in an int array with values from another int array.
|
public static char[] add(char[] array, char value)
public static char[] add(char[] array, char value, int index)
public static int[] add(int[] array, int value)
public static int[] add(int[] array, int value, int index)
public static int[] addIfAbsent(int[] array, int value)
public static int[] remove(int[] a, int anIndex)
public static int[] remove(int[] a, int start, int end)
public static int[] replace(int[] array, int start, int end, int[] replacement)
public static byte[] clone(byte[] array)
public static boolean[] clone(boolean[] array)
public static int[] clone(int[] array)
public static float[] clone(float[] array)
public static byte[] realloc(byte[] array, int size)
public static int[] realloc(int[] array, int size)
public static java.lang.Object[] realloc(java.lang.Object[] array, int size)
public static boolean equals(byte[] array1, byte[] array2)
public static boolean equals(byte[] array1, byte[] array2, int length)
public static boolean equals(int[] array1, int[] array2)
public static boolean equals(float[] array1, float[] array2)
public static int indexOf(java.lang.Object[] anArray, java.lang.Object anObj)
public static int indexOfIC(java.lang.Object[] anArray, java.lang.Object anObj)
public static boolean contains(java.lang.Object[] anArray, java.lang.Object anObj)
public static boolean containsIC(java.lang.Object[] anArray, java.lang.Object anObj)