Package com.reportmill.base
Class RMArrayUtils
- java.lang.Object
- 
- com.reportmill.base.RMArrayUtils
 
- 
 public class RMArrayUtils extends java.lang.ObjectA collection of array utility methods.
- 
- 
Constructor SummaryConstructors Constructor Description RMArrayUtils()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method 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 booleancontains(java.lang.Object[] anArray, java.lang.Object anObj)Returns whether the given array contains the given object.static booleancontainsIC(java.lang.Object[] anArray, java.lang.Object anObj)Returns whether the given array contains the given object (assuming strings and case insensitive).static booleanequals(byte[] array1, byte[] array2)Returns whether two byte arrays are equal.static booleanequals(byte[] array1, byte[] array2, int length)Returns whether two byte arrays are equal to the given length.static booleanequals(float[] array1, float[] array2)Returns whether two float arrays are equal.static booleanequals(int[] array1, int[] array2)Returns whether two boolean arrays are equal.static intindexOf(java.lang.Object[] anArray, java.lang.Object anObj)Returns the index of the given object in the given array.static intindexOfIC(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.
 
- 
- 
- 
Method Detail- 
addpublic static char[] add(char[] array, char value)Adds a char value to a char array.
 - 
addpublic static char[] add(char[] array, char value, int index)Adds a char value to a char array at the given index.
 - 
addpublic static int[] add(int[] array, int value)Adds an int value to an int array.
 - 
addpublic static int[] add(int[] array, int value, int index)Adds an int value to an int array at the given index.
 - 
addIfAbsentpublic 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.
 - 
removepublic static int[] remove(int[] a, int anIndex)Removes an int value from an int array.
 - 
removepublic static int[] remove(int[] a, int start, int end)Removes a range of values from an int array.
 - 
replacepublic 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.
 - 
clonepublic static byte[] clone(byte[] array) Clones a byte array.
 - 
clonepublic static boolean[] clone(boolean[] array) Clones a boolean array.
 - 
clonepublic static int[] clone(int[] array) Clones an int array.
 - 
clonepublic static float[] clone(float[] array) Clones a float array.
 - 
reallocpublic static byte[] realloc(byte[] array, int size)Creates a new byte array with original values and new size.
 - 
reallocpublic static int[] realloc(int[] array, int size)Creates a new int array with original values and new size.
 - 
reallocpublic static java.lang.Object[] realloc(java.lang.Object[] array, int size)Creates a new object array with original values and new size.
 - 
equalspublic static boolean equals(byte[] array1, byte[] array2)Returns whether two byte arrays are equal.
 - 
equalspublic static boolean equals(byte[] array1, byte[] array2, int length)Returns whether two byte arrays are equal to the given length.
 - 
equalspublic static boolean equals(int[] array1, int[] array2)Returns whether two boolean arrays are equal.
 - 
equalspublic static boolean equals(float[] array1, float[] array2)Returns whether two float arrays are equal.
 - 
indexOfpublic static int indexOf(java.lang.Object[] anArray, java.lang.Object anObj)Returns the index of the given object in the given array.
 - 
indexOfICpublic 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).
 - 
containspublic static boolean contains(java.lang.Object[] anArray, java.lang.Object anObj)Returns whether the given array contains the given object.
 - 
containsICpublic 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).
 
- 
 
-