Maven module :un.api : api-common :
Class : un.api.array.Arrays
Extends/Implements : -
Subclasses : -

Utility methods for arrays.
author  Johann Sorel
author  Yann D'Isanto
author  Bertrand Cote


Variables : ARRAY_BOOL_EMPTY, ARRAY_BYTE_EMPTY, ARRAY_SHORT_EMPTY, ARRAY_INT_EMPTY, ARRAY_LONG_EMPTY, ARRAY_FLOAT_EMPTY, ARRAY_DOUBLE_EMPTY, ARRAY_OBJECT_EMPTY
Functions : equals, equals, equals, equals, equals, equals, equals, equals, equals, equals, equals, equals, equals, equals, equals, equals, equals, equals, equals, equals, equals, equals, equals, equals, equals, equals, equals, equals, equals, equals, equals, equals, equals, resize, resize, resize, resize, resize, resize, resize, resize, resize, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, insert, insert, insert, insert, insert, insert, insert, insert, insert, remove, remove, remove, remove, remove, remove, remove, remove, remove, removeWithin, removeWithin, removeWithin, removeWithin, removeWithin, removeWithin, removeWithin, removeWithin, removeWithin, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, fill, reverse, reverse, reverse, reverse, reverse, reverse, reverse, reverse, reverse, reverse, reverse, reverse, reverse, reverse, reverse, reverse, reverse, reverse, swap, swap, swap, swap, swap, swap, swap, swap, swap, concatenate, concatenate, concatenate, concatenate, concatenate, concatenate, concatenate, concatenate, concatenate, contains, contains, contains, contains, contains, contains, contains, contains, contains, contains, contains, contains, contains, contains, contains, contains, contains, contains, containsIdentity, getFirstOccurence, getFirstOccurence, getFirstOccurence, getFirstOccurence, getFirstOccurence, getFirstOccurence, getFirstOccurence, getFirstOccurence, getFirstOccurence, getFirstOccurenceIdentity, toChars, toChars, toChars, toChars, toChars, toChars, toChars, toChars, toChars, toChars, toChars, toChars, toChars, toChars, toChars, toChars, toChars, toChars, identityContains, quickSort, quickSort, quickSort, quickSort, quickSort, quickSort, quickSort, sort, sort, sort, sort, sort, sort, sort, quickSort, sort, quickSort, sort, binarySearch, binarySearch, binarySearch, binarySearch, binarySearch, binarySearch, binarySearch, binarySearch, binarySearch, binarySearch, binarySearch, binarySearch, binarySearch, binarySearch, binarySearch, binarySearch, startsWith, startsWith, startsWith, startsWith, startsWith, startsWith, startsWith, startsWith, startsWith, startsWith, startsWith, startsWith, startsWith, startsWith, startsWith, startsWith, startsWith, startsWith, startsWith, startsWith, startsWith, startsWith, endsWith, endsWith, endsWith, endsWith, endsWith, endsWith, endsWith, endsWith, endsWith, endsWith, endsWith, endsWith, endsWith, endsWith, endsWith, endsWith, endsWith, endsWith, endsWith, endsWith, endsWith, endsWith, reformatDouble, reformatToDouble, reformatToDouble, reformatToFloat, reformatToFloat, reformatToLong, reformatToInt, reformatToInt, reformatToInt, reformatToInt, reformatToInt, reformatToShort, reformatToByte, arrayXOR



0 length boolean array */
public boolean[] ARRAY_BOOL_EMPTY


0 length byte array */
public byte[] ARRAY_BYTE_EMPTY


0 length short array */
public short[] ARRAY_SHORT_EMPTY


0 length int array */
public int[] ARRAY_INT_EMPTY


0 length long array */
public long[] ARRAY_LONG_EMPTY


0 length float array */
public float[] ARRAY_FLOAT_EMPTY


0 length double array */
public double[] ARRAY_DOUBLE_EMPTY


0 length object array */
public Object[] ARRAY_OBJECT_EMPTY



Test if arrays are equals.
Will return true if array size are the same and all elements are equal
and in the same order.
param  a1, not null
param  a2, not null
return  true if arrays are equal
public boolean equals (boolean[] a1, boolean[] a2)


Test if arrays are equals.
Will return true if array size are the same and all elements are equal
and in the same order.
param  a1, not null
param  a2, not null
return  true if arrays are equal
public boolean equals (char[] a1, char[] a2)


Test if arrays are equals.
Will return true if array size are the same and all elements are equal
and in the same order.
param  a1, not null
param  a2, not null
return  true if arrays are equal
public boolean equals (byte[] a1, byte[] a2)


Test if arrays are equals.
Will return true if array size are the same and all elements are equal
and in the same order.
param  a1, not null
param  a2, not null
return  true if arrays are equal
public boolean equals (short[] a1, short[] a2)


Test if arrays are equals.
Will return true if array size are the same and all elements are equal
and in the same order.
param  a1, not null
param  a2, not null
return  true if arrays are equal
public boolean equals (int[] a1, int[] a2)


Test if arrays are equals.
Will return true if array size are the same and all elements are equal
and in the same order.
param  a1, not null
param  a2, not null
return  true if arrays are equal
public boolean equals (long[] a1, long[] a2)


Test if arrays are equals.
Will return true if array size are the same and all elements are equal
and in the same order.
param  a1, not null
param  a2, not null
return  true if arrays are equal
public boolean equals (float[] a1, float[] a2)


Test if arrays are equals.
Will return true if array size are the same and all elements are equal
and in the same order.
param  a1, not null
param  a2, not null
param  tolerance, tolerance
return  true if arrays are equal
public boolean equals (float[] a1, float[] a2, double tolerance)


Test if arrays are equals.
Will return true if array size are the same and all elements are equal
and in the same order.
param  a1, not null
param  a2, not null
return  true if arrays are equal
public boolean equals (double[] a1, double[] a2)


Test if arrays are equals.
Will return true if array size are the same and all elements are equal
and in the same order.
param  a1, not null
param  a2, not null
param  tolerance, tolerance
return  true if arrays are equal
public boolean equals (double[] a1, double[] a2, double tolerance)


Test if arrays are equals.
Will return true if array size are the same and all elements are equal
and in the same order. Object equaltiy is made with equals method.
param  a1, not null
param  a2, not null
return  true if arrays are equal
public boolean equals (Object[] a1, Object[] a2)


Test if arrays are equals.
Will return true if array size are the same and all elements are equal
and in the same order.
param  a1, not null
param  a2, not null
return  true if arrays are equal
public boolean equals (boolean[][] a1, boolean[][] a2)


Test if arrays are equals.
Will return true if array size are the same and all elements are equal
and in the same order.
param  a1, not null
param  a2, not null
return  true if arrays are equal
public boolean equals (char[][] a1, char[][] a2)


Test if arrays are equals.
Will return true if array size are the same and all elements are equal
and in the same order.
param  a1, not null
param  a2, not null
return  true if arrays are equal
public boolean equals (byte[][] a1, byte[][] a2)


Test if arrays are equals.
Will return true if array size are the same and all elements are equal
and in the same order.
param  a1, not null
param  a2, not null
return  true if arrays are equal
public boolean equals (short[][] a1, short[][] a2)


Test if arrays are equals.
Will return true if array size are the same and all elements are equal
and in the same order.
param  a1, not null
param  a2, not null
return  true if arrays are equal
public boolean equals (int[][] a1, int[][] a2)


Test if arrays are equals.
Will return true if array size are the same and all elements are equal
and in the same order.
param  a1, not null
param  a2, not null
return  true if arrays are equal
public boolean equals (long[][] a1, long[][] a2)


Test if arrays are equals.
Will return true if array size are the same and all elements are equal
and in the same order.
param  a1, not null
param  a2, not null
return  true if arrays are equal
public boolean equals (float[][] a1, float[][] a2)


Test if arrays are equals.
Will return true if array size are the same and all elements are equal
and in the same order.
param  a1, not null
param  a2, not null
param  tolerance, tolerance
return  true if arrays are equal
public boolean equals (float[][] a1, float[][] a2, double tolerance)


Test if arrays are equals.
Will return true if array size are the same and all elements are equal
and in the same order.
param  a1, not null
param  a2, not null
return  true if arrays are equal
public boolean equals (double[][] a1, double[][] a2)


Test if arrays are equals.
Will return true if array size are the same and all elements are equal
and in the same order.
param  a1, not null
param  a2, not null
param  tolerance, tolerance
return  true if arrays are equal
public boolean equals (double[][] a1, double[][] a2, double tolerance)


Test if arrays are equals.
Will return true if array size are the same and all elements are equal
and in the same order.
param  a1, not null
param  a2, not null
return  true if arrays are equal
public boolean equals (Object[][] a1, Object[][] a2)


Test if arrays are equals from soffset and given length.
Will return true if array size are the same and all elements are equal
and in the same order.
Warning : offset+length lust not outpass array size
param  a1, not null
param  soffset, first array offset, must be positive
param  length, range length to test
param  a2, not null
param  toffset, second array offset, must be positive
return  true if arrays are equal
public boolean equals (boolean[] a1, int soffset, int length, boolean[] a2, int toffset)


Test if arrays are equals from soffset and given length.
Will return true if array size are the same and all elements are equal
and in the same order.
Warning : offset+length lust not outpass array size
param  a1, not null
param  soffset, first array offset, must be positive
param  length, range length to test
param  a2, not null
param  toffset, second array offset, must be positive
return  true if arrays are equal
public boolean equals (char[] a1, int soffset, int length, char[] a2, int toffset)


Test if arrays are equals from soffset and given length.
Will return true if array size are the same and all elements are equal
and in the same order.
Warning : offset+length lust not outpass array size
param  a1, not null
param  soffset, first array offset, must be positive
param  length, range length to test
param  a2, not null
param  toffset, second array offset, must be positive
return  true if arrays are equal
public boolean equals (byte[] a1, int soffset, int length, byte[] a2, int toffset)


Test if arrays are equals from soffset and given length.
Will return true if array size are the same and all elements are equal
and in the same order.
Warning : offset+length lust not outpass array size
param  a1, not null
param  soffset, first array offset, must be positive
param  length, range length to test
param  a2, not null
param  toffset, second array offset, must be positive
return  true if arrays are equal
public boolean equals (short[] a1, int soffset, int length, short[] a2, int toffset)


Test if arrays are equals from soffset and given length.
Will return true if array size are the same and all elements are equal
and in the same order.
Warning : offset+length lust not outpass array size
param  a1, not null
param  soffset, first array offset, must be positive
param  length, range length to test
param  a2, not null
param  toffset, second array offset, must be positive
return  true if arrays are equal
public boolean equals (int[] a1, int soffset, int length, int[] a2, int toffset)


Test if arrays are equals from soffset and given length.
Will return true if array size are the same and all elements are equal
and in the same order.
Warning : offset+length lust not outpass array size
param  a1, not null
param  soffset, first array offset, must be positive
param  length, range length to test
param  a2, not null
param  toffset, second array offset, must be positive
return  true if arrays are equal
public boolean equals (long[] a1, int soffset, int length, long[] a2, int toffset)


Test if arrays are equals from soffset and given length.
Will return true if array size are the same and all elements are equal
and in the same order.
Warning : offset+length lust not outpass array size
param  a1, not null
param  soffset, first array offset, must be positive
param  length, range length to test
param  a2, not null
param  toffset, second array offset, must be positive
return  true if arrays are equal
public boolean equals (float[] a1, int soffset, int length, float[] a2, int toffset)


Test if arrays are equals from soffset and given length.
Will return true if array size are the same and all elements are equal
and in the same order.
Warning : offset+length lust not outpass array size
param  a1, not null
param  soffset, first array offset, must be positive
param  length, range length to test
param  a2, not null
param  toffset, second array offset, must be positive
param  tolerance, tolerance
return  true if arrays are equal
public boolean equals (float[] a1, int soffset, int length, float[] a2, int toffset, double tolerance)


Test if arrays are equals from soffset and given length.
Will return true if array size are the same and all elements are equal
and in the same order.
Warning : offset+length lust not outpass array size
param  a1, not null
param  soffset, first array offset, must be positive
param  length, range length to test
param  a2, not null
param  toffset, second array offset, must be positive
return  true if arrays are equal
public boolean equals (double[] a1, int soffset, int length, double[] a2, int toffset)


Test if arrays are equals from soffset and given length.
Will return true if array size are the same and all elements are equal
and in the same order.
Warning : offset+length lust not outpass array size
param  a1, not null
param  soffset, first array offset, must be positive
param  length, range length to test
param  a2, not null
param  toffset, second array offset, must be positive
param  tolerance, tolerance
return  true if arrays are equal
public boolean equals (double[] a1, int soffset, int length, double[] a2, int toffset, double tolerance)


Test if arrays are equals from soffset and given length.
Will return true if array size are the same and all elements are equal
and in the same order. Object equaltiy is made with equals method.
Warning : offset+length lust not outpass array size
param  a1, not null
param  soffset, first array offset, must be positive
param  length, range length to test
param  a2, not null
param  toffset, second array offset, must be positive
return  true if arrays are equal
public boolean equals (Object[] a1, int soffset, int length, Object[] a2, int toffset)


Create a copy of given array.
if the new size is larger than original array, remaining cells will be filled
with default type value.
if new size is smaller the original array, values will be truncated.
param  array not null
param  newSize new size, must be 0 or positive
return  new array of given size
public boolean[] resize (boolean[] array, int newSize)


Create a copy of given array.
if the new size is larger than original array, remaining cells will be filled
with default type value.
if new size is smaller the original array, values will be truncated.
param  array not null
param  newSize new size, must be 0 or positive
return  new array of given size
public char[] resize (char[] array, int newSize)


Create a copy of given array.
if the new size is larger than original array, remaining cells will be filled
with default type value.
if new size is smaller the original array, values will be truncated.
param  array not null
param  newSize new size, must be 0 or positive
return  new array of given size
public byte[] resize (byte[] array, int newSize)


Create a copy of given array.
if the new size is larger than original array, remaining cells will be filled
with default type value.
if new size is smaller the original array, values will be truncated.
param  array not null
param  newSize new size, must be 0 or positive
return  new array of given size
public short[] resize (short[] array, int newSize)


Create a copy of given array.
if the new size is larger than original array, remaining cells will be filled
with default type value.
if new size is smaller the original array, values will be truncated.
param  array not null
param  newSize new size, must be 0 or positive
return  new array of given size
public int[] resize (int[] array, int newSize)


Create a copy of given array.
if the new size is larger than original array, remaining cells will be filled
with default type value.
if new size is smaller the original array, values will be truncated.
param  array not null
param  newSize new size, must be 0 or positive
return  new array of given size
public long[] resize (long[] array, int newSize)


Create a copy of given array.
if the new size is larger than original array, remaining cells will be filled
with default type value.
if new size is smaller the original array, values will be truncated.
param  array not null
param  newSize new size, must be 0 or positive
return  new array of given size
public float[] resize (float[] array, int newSize)


Create a copy of given array.
if the new size is larger than original array, remaining cells will be filled
with default type value.
if new size is smaller the original array, values will be truncated.
param  array not null
param  newSize new size, must be 0 or positive
return  new array of given size
public double[] resize (double[] array, int newSize)


Create a copy of given array.
if the new size is larger than original array, remaining cells will be filled
with default type value.
if new size is smaller the original array, values will be truncated.
param  array not null
param  newSize new size, must be 0 or positive
return  new array of given size
public Object[] resize (Object[] array, int newSize)


Copy a portion of given array.
If needed, the returned array is padded with zeros to obtain the required
length.
param  source not null
param  offset offset to start copying
param  length number of elements to copy.
return  new array
public boolean[] copy (boolean[] source, int offset, int length)


Copy a portion of given array.
If needed, the returned array is padded with zeros to obtain the required
length.
param  source not null
param  offset offset to start copying
param  length number of elements to copy.
return  new array
public char[] copy (char[] source, int offset, int length)


Copy a portion of given array.
If needed, the returned array is padded with zeros to obtain the required
length.
param  source not null
param  offset offset to start copying
param  length number of elements to copy.
return  new array
public byte[] copy (byte[] source, int offset, int length)


Copy a portion of given array.
If needed, the returned array is padded with zeros to obtain the required
length.
param  source not null
param  offset offset to start copying
param  length number of elements to copy.
return  new array
public short[] copy (short[] source, int offset, int length)


Copy a portion of given array.
If needed, the returned array is padded with zeros to obtain the required
length.
param  source not null
param  offset offset to start copying
param  length number of elements to copy.
return  new array
public int[] copy (int[] source, int offset, int length)


Copy a portion of given array.
If needed, the returned array is padded with zeros to obtain the required
length.
param  source not null
param  offset offset to start copying
param  length number of elements to copy.
return  new array
public long[] copy (long[] source, int offset, int length)


Copy a portion of given array.
If needed, the returned array is padded with zeros to obtain the required
length.
param  source not null
param  offset offset to start copying
param  length number of elements to copy.
return  new array
public float[] copy (float[] source, int offset, int length)


Copy a portion of given array.
If needed, the returned array is padded with zeros to obtain the required
length.
param  source not null
param  offset offset to start copying
param  length number of elements to copy.
return  new array
public double[] copy (double[] source, int offset, int length)


Copy a portion of given array.
If needed, the returned array is padded with nulls to obtain the required
length.
param  source not null
param  offset offset to start copying
param  length number of elements to copy.
return  new array
public Object[] copy (Object[] source, int offset, int length)


Copy given array.
param  source not null
return  new array
public boolean[] copy (boolean[] source)


Copy given array.
param  source not null
return  new array
public char[] copy (char[] source)


Copy given array.
param  source not null
return  new array
public byte[] copy (byte[] source)


Copy given array.
param  source not null
return  new array
public short[] copy (short[] source)


Copy given array.
param  source not null
return  new array
public int[] copy (int[] source)


Copy given array.
param  source not null
return  new array
public long[] copy (long[] source)


Copy given array.
param  source not null
return  new array
public float[] copy (float[] source)


Copy given array.
param  source not null
return  new array
public double[] copy (double[] source)


Copy given array.
param  source not null
return  new array
public Object[] copy (Object[] source)


Copy a portion of given source array of length elements from soffset index, to
the target array beginning to toffset index.
If needed, the returned array is padded with zeros to obtain the required
length.
param  source not null
param  soffset offset to start copying
param  length number of elemnts to copy
param  target array where to insert new elements
param  toffset start insert index
return  the target array with copied values.
public boolean[] copy (boolean[] source, int soffset, int length, boolean[] target, int toffset)


Copy a portion of given source array of length elements from soffset index, to
the target array beginning to toffset index.
If needed, the returned array is padded with zeros to obtain the required
length.
param  source not null
param  soffset offset to start copying
param  length number of elemnts to copy
param  target array where to insert new elements
param  toffset start insert index
return  the target array with copied values.
public char[] copy (char[] source, int soffset, int length, char[] target, int toffset)


Copy a portion of given source array of length elements from soffset index, to
the target array beginning to toffset index.
If needed, the returned array is padded with zeros to obtain the required
length.
param  source not null
param  soffset offset to start copying
param  length number of elemnts to copy
param  target array where to insert new elements
param  toffset start insert index
return  the target array with copied values.
public byte[] copy (byte[] source, int soffset, int length, byte[] target, int toffset)


Copy a portion of given source array of length elements from soffset index, to
the target array beginning to toffset index.
If needed, the returned array is padded with zeros to obtain the required
length.
param  source not null
param  soffset offset to start copying
param  length number of elemnts to copy
param  target array where to insert new elements
param  toffset start insert index
return  the target array with copied values.
public short[] copy (short[] source, int soffset, int length, short[] target, int toffset)


Copy a portion of given source array of length elements from soffset index, to
the target array beginning to toffset index.
If needed, the returned array is padded with zeros to obtain the required
length.
param  source not null
param  soffset offset to start copying
param  length number of elemnts to copy
param  target array where to insert new elements
param  toffset start insert index
return  the target array with copied values.
public int[] copy (int[] source, int soffset, int length, int[] target, int toffset)


Copy a portion of given source array of length elements from soffset index, to
the target array beginning to toffset index.
If needed, the returned array is padded with zeros to obtain the required
length.
param  source not null
param  soffset offset to start copying
param  length number of elemnts to copy
param  target array where to insert new elements
param  toffset start insert index
return  the target array with copied values.
public long[] copy (long[] source, int soffset, int length, long[] target, int toffset)


Copy a portion of given source array of length elements from soffset index, to
the target array beginning to toffset index.
If needed, the returned array is padded with zeros to obtain the required
length.
param  source not null
param  soffset offset to start copying
param  length number of elemnts to copy
param  target array where to insert new elements
param  toffset start insert index
return  the target array with copied values.
public float[] copy (float[] source, int soffset, int length, float[] target, int toffset)


Copy a portion of given source array of length elements from soffset index, to
the target array beginning to toffset index.
If needed, the returned array is padded with zeros to obtain the required
length.
param  source not null
param  soffset offset to start copying
param  length number of elemnts to copy
param  target array where to insert new elements
param  toffset start insert index
return  the target array with copied values.
public double[] copy (double[] source, int soffset, int length, double[] target, int toffset)


Copy a portion of given source array of length elements from soffset index, to
the target array beginning to toffset index.
If needed, the returned array is padded with zeros to obtain the required
length.
param  source not null
param  soffset offset to start copying
param  length number of elemnts to copy
param  target array where to insert new elements
param  toffset start insert index
return  the target array with copied values.
public Object[] copy (Object[] source, int soffset, int length, Object[] target, int toffset)


Copy the given 2D source array.
param  source array to copy
return  array copy
public boolean[][] copy (boolean[][] source)


Copy the given 2D source array.
param  source array to copy
return  array copy
public char[][] copy (char[][] source)


Copy the given 2D source array.
param  source array to copy
return  array copy
public byte[][] copy (byte[][] source)


Copy the given 2D source array.
param  source array to copy
return  array copy
public short[][] copy (short[][] source)


Copy the given 2D source array.
param  source array to copy
return  array copy
public int[][] copy (int[][] source)


Copy the given 2D source array.
param  source array to copy
return  array copy
public long[][] copy (long[][] source)


Copy the given 2D source array.
param  source array to copy
return  array copy
public float[][] copy (float[][] source)


Copy the given 2D source array.
param  source array to copy
return  array copy
public double[][] copy (double[][] source)


Copy the given 2D source array.
param  source array to copy
return  array copy
public Object[][] copy (Object[][] source)


Copy a portion of given 2D source array, from column sx and row sy of
width w and height h, to the target array from column tx and row ty.
param  source 2D array
param  sx source column beginning
param  sy source row beginning
param  w width
param  h height
param  target 2D array
param  tx target column beginning
param  ty target row beginning
return  the target array with copied values.
public boolean[][] copy (boolean[][] source, int sx, int sy, int w, int h, boolean[][] target, int tx, int ty)


Copy a portion of given 2D source array, from column sx and row sy of
width w and height h, to the target array from column tx and row ty.
param  source 2D array
param  sx source column beginning
param  sy source row beginning
param  w width
param  h height
param  target 2D array
param  tx target column beginning
param  ty target row beginning
return  the target array with copied values.
public char[][] copy (char[][] source, int sx, int sy, int w, int h, char[][] target, int tx, int ty)


Copy a portion of given 2D source array, from column sx and row sy of
width w and height h, to the target array from column tx and row ty.
param  source 2D array
param  sx source column beginning
param  sy source row beginning
param  w width
param  h height
param  target 2D array
param  tx target column beginning
param  ty target row beginning
return  the target array with copied values.
public byte[][] copy (byte[][] source, int sx, int sy, int w, int h, byte[][] target, int tx, int ty)


Copy a portion of given 2D source array, from column sx and row sy of
width w and height h, to the target array from column tx and row ty.
param  source 2D array
param  sx source column beginning
param  sy source row beginning
param  w width
param  h height
param  target 2D array
param  tx target column beginning
param  ty target row beginning
return  the target array with copied values.
public short[][] copy (short[][] source, int sx, int sy, int w, int h, short[][] target, int tx, int ty)


Copy a portion of given 2D source array, from column sx and row sy of
width w and height h, to the target array from column tx and row ty.
param  source 2D array
param  sx source column beginning
param  sy source row beginning
param  w width
param  h height
param  target 2D array
param  tx target column beginning
param  ty target row beginning
return  the target array with copied values.
public int[][] copy (int[][] source, int sx, int sy, int w, int h, int[][] target, int tx, int ty)


Copy a portion of given 2D source array, from column sx and row sy of
width w and height h, to the target array from column tx and row ty.
param  source 2D array
param  sx source column beginning
param  sy source row beginning
param  w width
param  h height
param  target 2D array
param  tx target column beginning
param  ty target row beginning
return  the target array with copied values.
public long[][] copy (long[][] source, int sx, int sy, int w, int h, long[][] target, int tx, int ty)


Copy a portion of given 2D source array, from column sx and row sy of
width w and height h, to the target array from column tx and row ty.
param  source 2D array
param  sx source column beginning
param  sy source row beginning
param  w width
param  h height
param  target 2D array
param  tx target column beginning
param  ty target row beginning
return  the target array with copied values.
public float[][] copy (float[][] source, int sx, int sy, int w, int h, float[][] target, int tx, int ty)


Copy a portion of given 2D source array, from column sx and row sy of
width w and height h, to the target array from column tx and row ty.
param  source 2D array
param  sx source column beginning
param  sy source row beginning
param  w width
param  h height
param  target 2D array
param  tx target column beginning
param  ty target row beginning
return  the target array with copied values.
public double[][] copy (double[][] source, int sx, int sy, int w, int h, double[][] target, int tx, int ty)


Copy a portion of given 2D source array, from column sx and row sy of
width w and height h, to the target array from column tx and row ty.
param  source 2D array
param  sx source column beginning
param  sy source row beginning
param  w width
param  h height
param  target 2D array
param  tx target column beginning
param  ty target row beginning
return  the target array with copied values.
public Object[][] copy (Object[][] source, int sx, int sy, int w, int h, Object[][] target, int tx, int ty)


Insert given element at index.
param  values original array
param  index insert index
param  value inserted value
return  new array which size is source.size + 1
public boolean[] insert (boolean[] values, int index, boolean value)


Insert given element at index.
param  values original array
param  index insert index
param  value inserted value
return  new array which size is source.size + 1
public char[] insert (char[] values, int index, char value)


Insert given element at index.
param  values original array
param  index insert index
param  value inserted value
return  new array which size is source.size + 1
public byte[] insert (byte[] values, int index, byte value)


Insert given element at index.
param  values original array
param  index insert index
param  value inserted value
return  new array which size is source.size + 1
public short[] insert (short[] values, int index, short value)


Insert given element at index.
param  values original array
param  index insert index
param  value inserted value
return  new array which size is source.size + 1
public int[] insert (int[] values, int index, int value)


Insert given element at index.
param  values original array
param  index insert index
param  value inserted value
return  new array which size is source.size + 1
public long[] insert (long[] values, int index, long value)


Insert given element at index.
param  values original array
param  index insert index
param  value inserted value
return  new array which size is source.size + 1
public float[] insert (float[] values, int index, float value)


Insert given element at index.
param  values original array
param  index insert index
param  value inserted value
return  new array which size is source.size + 1
public double[] insert (double[] values, int index, double value)


Insert given element at index.
param  values original array
param  index insert index
param  value inserted value
return  new array which size is source.size + 1
public Object[] insert (Object[] values, int index, Object value)


Remove element at index.
param  values original array
param  index removed element index
return  new array which size is source.size - 1
public boolean[] remove (boolean[] values, int index)


Remove element at index.
param  values original array
param  index removed element index
return  new array which size is source.size - 1
public char[] remove (char[] values, int index)


Remove element at index.
param  values original array
param  index removed element index
return  new array which size is source.size - 1
public byte[] remove (byte[] values, int index)


Remove element at index.
param  values original array
param  index removed element index
return  new array which size is source.size - 1
public short[] remove (short[] values, int index)


Remove element at index.
param  values original array
param  index removed element index
return  new array which size is source.size - 1
public int[] remove (int[] values, int index)


Remove element at index.
param  values original array
param  index removed element index
return  new array which size is source.size - 1
public long[] remove (long[] values, int index)


Remove element at index.
param  values original array
param  index removed element index
return  new array which size is source.size - 1
public float[] remove (float[] values, int index)


Remove element at index.
param  values original array
param  index removed element index
return  new array which size is source.size - 1
public double[] remove (double[] values, int index)


Remove element at index.
param  values original array
param  index removed element index
return  new array which size is source.size - 1
public Object[] remove (Object[] values, int index)


Remove element at index.
Move elements after index by -1.
Last element is set to zero
param  values original array
param  index removed element index
return  removed value
public boolean removeWithin (boolean[] values, int index)


Remove element at index.
Move elements after index by -1.
Last element is set to zero
param  values original array
param  index removed element index
return  removed value
public char removeWithin (char[] values, int index)


Remove element at index.
Move elements after index by -1.
Last element is set to zero
param  values original array
param  index removed element index
return  removed value
public byte removeWithin (byte[] values, int index)


Remove element at index.
Move elements after index by -1.
Last element is set to zero
param  values original array
param  index removed element index
return  removed value
public short removeWithin (short[] values, int index)


Remove element at index.
Move elements after index by -1.
Last element is set to zero
param  values original array
param  index removed element index
return  removed value
public int removeWithin (int[] values, int index)


Remove element at index.
Move elements after index by -1.
Last element is set to zero
param  values original array
param  index removed element index
return  removed value
public long removeWithin (long[] values, int index)


Remove element at index.
Move elements after index by -1.
Last element is set to zero
param  values original array
param  index removed element index
return  removed value
public float removeWithin (float[] values, int index)


Remove element at index.
Move elements after index by -1.
Last element is set to zero
param  values original array
param  index removed element index
return  removed value
public double removeWithin (double[] values, int index)


Remove element at index.
Move elements after index by -1.
Last element is set to null
param  values original array
param  index removed element index
return  removed object
public Object removeWithin (Object[] values, int index)


Fill the given array with the given value.
param  buffer the array to fill in.
param  value fill value
public void fill (boolean[] buffer, boolean value)


Fill the given array with the given value.
param  buffer the array to fill in.
param  value fill value
public void fill (char[] buffer, char value)


Fill the given array with the given value.
param  buffer the array to fill in.
param  value fill value
public void fill (byte[] buffer, byte value)


Fill the given array with the given value.
param  buffer the array to fill in.
param  value fill value
public void fill (short[] buffer, short value)


Fill the given array with the given value.
param  buffer the array to fill in.
param  value fill value
public void fill (int[] buffer, int value)


Fill the given array with the given value.
param  buffer the array to fill in.
param  value fill value
public void fill (long[] buffer, long value)


Fill the given array with the given value.
param  buffer the array to fill in.
param  value fill value
public void fill (float[] buffer, float value)


Fill the given array with the given value.
param  buffer the array to fill in.
param  value fill value
public void fill (double[] buffer, double value)


Fill the given array with the given value.
param  buffer the array to fill in.
param  value fill value
public void fill (Object[] buffer, Object value)


Fill the given array with the given value, from the given offset, on the
given length.
param  buffer the array to fill in.
param  offset start index offset
param  length number of elements to fill
param  value fill value
public void fill (boolean[] buffer, int offset, int length, boolean value)


Fill the given array with the given value, from the given offset, on the
given length.
param  buffer the array to fill in.
param  offset start index offset
param  length number of elements to fill
param  value fill value
public void fill (char[] buffer, int offset, int length, char value)


Fill the given array with the given value, from the given offset, on the
given length.
param  buffer the array to fill in.
param  offset start index offset
param  length number of elements to fill
param  value fill value
public void fill (byte[] buffer, int offset, int length, byte value)


Fill the given array with the given value, from the given offset, on the
given length.
param  buffer the array to fill in.
param  offset start index offset
param  length number of elements to fill
param  value fill value
public void fill (short[] buffer, int offset, int length, short value)


Fill the given array with the given value, from the given offset, on the
given length.
param  buffer the array to fill in.
param  offset start index offset
param  length number of elements to fill
param  value fill value
public void fill (int[] buffer, int offset, int length, int value)


Fill the given array with the given value, from the given offset, on the
given length.
param  buffer the array to fill in.
param  offset start index offset
param  length number of elements to fill
param  value fill value
public void fill (long[] buffer, int offset, int length, long value)


Fill the given array with the given value, from the given offset, on the
given length.
param  buffer the array to fill in.
param  offset start index offset
param  length number of elements to fill
param  value fill value
public void fill (float[] buffer, int offset, int length, float value)


Fill the given array with the given value, from the given offset, on the
given length.
param  buffer the array to fill in.
param  offset start index offset
param  length number of elements to fill
param  value fill value
public void fill (double[] buffer, int offset, int length, double value)


Fill the given array with the given value, from the given offset, on the
given length.
param  buffer the array to fill in.
param  offset start index offset
param  length number of elements to fill
param  value fill value
public void fill (Object[] buffer, int offset, int length, Object value)


Reverse array order, first one becomes last.
param  array array to reverse
param  offset start offset
param  length number of elements
public void reverse (boolean[] array, int offset, int length)


Reverse array order, first one becomes last.
param  array array to reverse
param  offset start offset
param  length number of elements
public void reverse (char[] array, int offset, int length)


Reverse array order, first one becomes last.
param  array array to reverse
param  offset start offset
param  length number of elements
public void reverse (byte[] array, int offset, int length)


Reverse array order, first one becomes last.
param  array array to reverse
param  offset start offset
param  length number of elements
public void reverse (short[] array, int offset, int length)


Reverse array order, first one becomes last.
param  array array to reverse
param  offset start offset
param  length number of elements
public void reverse (int[] array, int offset, int length)


Reverse array order, first one becomes last.
param  array array to reverse
param  offset start offset
param  length number of elements
public void reverse (long[] array, int offset, int length)


Reverse array order, first one becomes last.
param  array array to reverse
param  offset start offset
param  length number of elements
public void reverse (float[] array, int offset, int length)


Reverse array order, first one becomes last.
param  array array to reverse
param  offset start offset
param  length number of elements
public void reverse (double[] array, int offset, int length)


Reverse array order, first one becomes last.
param  array array to reverse
param  offset start offset
param  length number of elements
public void reverse (Object[] array, int offset, int length)


Reverse array order by blocks, first one becomes last.
param  array array to reverse
param  offset start offset
param  length number of elements
param  blockSize number of element which compose an element
public void reverse (boolean[] array, int offset, int length, int blockSize)


Reverse array order by blocks, first one becomes last.
param  array array to reverse
param  offset start offset
param  length number of elements
param  blockSize number of element which compose an element
public void reverse (char[] array, int offset, int length, int blockSize)


Reverse array order by blocks, first one becomes last.
param  array array to reverse
param  offset start offset
param  length number of elements
param  blockSize number of element which compose an element
public void reverse (byte[] array, int offset, int length, int blockSize)


Reverse array order by blocks, first one becomes last.
param  array array to reverse
param  offset start offset
param  length number of elements
param  blockSize number of element which compose an element
public void reverse (short[] array, int offset, int length, int blockSize)


Reverse array order by blocks, first one becomes last.
param  array array to reverse
param  offset start offset
param  length number of elements
param  blockSize number of element which compose an element
public void reverse (int[] array, int offset, int length, int blockSize)


Reverse array order by blocks, first one becomes last.
param  array array to reverse
param  offset start offset
param  length number of elements
param  blockSize number of element which compose an element
public void reverse (long[] array, int offset, int length, int blockSize)


Reverse array order by blocks, first one becomes last.
param  array array to reverse
param  offset start offset
param  length number of elements
param  blockSize number of element which compose an element
public void reverse (float[] array, int offset, int length, int blockSize)


Reverse array order by blocks, first one becomes last.
param  array array to reverse
param  offset start offset
param  length number of elements
param  blockSize number of element which compose an element
public void reverse (double[] array, int offset, int length, int blockSize)


Reverse array order by blocks, first one becomes last.
param  array array to reverse
param  offset start offset
param  length number of elements
param  blockSize number of element which compose an element
public void reverse (Object[] array, int offset, int length, int blockSize)


Swap values in array at given indexes.
param  array array to process
param  index1 index in array of first value
param  index2 index in array of second value
public void swap (boolean[] array, int index1, int index2)


Swap values in array at given indexes.
param  array array to process
param  index1 index in array of first value
param  index2 index in array of second value
public void swap (char[] array, int index1, int index2)


Swap values in array at given indexes.
param  array array to process
param  index1 index in array of first value
param  index2 index in array of second value
public void swap (byte[] array, int index1, int index2)


Swap values in array at given indexes.
param  array array to process
param  index1 index in array of first value
param  index2 index in array of second value
public void swap (short[] array, int index1, int index2)


Swap values in array at given indexes.
param  array array to process
param  index1 index in array of first value
param  index2 index in array of second value
public void swap (int[] array, int index1, int index2)


Swap values in array at given indexes.
param  array array to process
param  index1 index in array of first value
param  index2 index in array of second value
public void swap (long[] array, int index1, int index2)


Swap values in array at given indexes.
param  array array to process
param  index1 index in array of first value
param  index2 index in array of second value
public void swap (float[] array, int index1, int index2)


Swap values in array at given indexes.
param  array array to process
param  index1 index in array of first value
param  index2 index in array of second value
public void swap (double[] array, int index1, int index2)


Swap values in array at given indexes.
param  array array to process
param  index1 index in array of first value
param  index2 index in array of second value
public void swap (Object[] array, int index1, int index2)


Concatenate a array of boolean arrays.
param  arrays arrays to concatenate
return  boolean[] result concatenated array
public boolean[] concatenate (boolean[][] arrays)


Concatenate a array of char arrays.
param  arrays arrays to concatenate
return  char[] result concatenated array
public char[] concatenate (char[][] arrays)


Concatenate a array of byte arrays.
param  arrays arrays to concatenate
return  byte[] result concatenated array
public byte[] concatenate (byte[][] arrays)


Concatenate a array of short arrays.
param  arrays arrays to concatenate
return  short[] result concatenated array
public short[] concatenate (short[][] arrays)


Concatenate a array of int arrays.
param  arrays arrays to concatenate
return  int[] result concatenated array
public int[] concatenate (int[][] arrays)


Concatenate a array of long arrays.
param  arrays arrays to concatenate
return  long[] result concatenated array
public long[] concatenate (long[][] arrays)


Concatenate a array of float arrays.
param  arrays arrays to concatenate
return  float[] result concatenated array
public float[] concatenate (float[][] arrays)


Concatenate a array of double arrays.
param  arrays arrays to concatenate
return  double[] result concatenated array
public double[] concatenate (double[][] arrays)


Concatenate a array of Object arrays.
param  arrays arrays to concatenate
return  Object[] result concatenated array
public Object[] concatenate (Object[][] arrays)


Check if an element is contained is this array.
param  array search array
param  candidate searched value
return  true if element is in the array, otherwise return false.
public boolean contains (boolean[] array, boolean candidate)


Check if an element is contained is this array.
param  array search array
param  candidate searched value
return  true if element is in the array, otherwise return false.
public boolean contains (char[] array, char candidate)


Check if an element is contained is this array.
param  array search array
param  candidate searched value
return  true if element is in the array, otherwise return false.
public boolean contains (byte[] array, byte candidate)


Check if an element is contained is this array.
param  array search array
param  candidate searched value
return  true if element is in the array, otherwise return false.
public boolean contains (short[] array, short candidate)


Check if an element is contained is this array.
param  array search array
param  candidate searched value
return  true if element is in the array, otherwise return false.
public boolean contains (int[] array, int candidate)


Check if an element is contained is this array.
param  array search array
param  candidate searched value
return  true if element is in the array, otherwise return false.
public boolean contains (long[] array, long candidate)


Check if an element is contained is this array.
param  array search array
param  candidate searched value
return  true if element is in the array, otherwise return false.
public boolean contains (float[] array, float candidate)


Check if an element is contained is this array.
param  array search array
param  candidate searched value
return  true if element is in the array, otherwise return false.
public boolean contains (double[] array, double candidate)


Check if an element is contained is this array.
param  array search array
param  candidate searched value
return  true if element is in the array, otherwise return false.
public boolean contains (Object[] array, Object candidate)


Check if an element is contained is this array range.
param  array search array
param  offset index where to start searching
param  length number of elements to test
param  candidate searched value
return  true if element is in the array range, otherwise return false.
public boolean contains (boolean[] array, int offset, int length, boolean candidate)


Check if an element is contained is this array range.
param  array search array
param  offset index where to start searching
param  length number of elements to test
param  candidate searched value
return  true if element is in the array range, otherwise return false.
public boolean contains (char[] array, int offset, int length, char candidate)


Check if an element is contained is this array range.
param  array search array
param  offset index where to start searching
param  length number of elements to test
param  candidate searched value
return  true if element is in the array range, otherwise return false.
public boolean contains (byte[] array, int offset, int length, byte candidate)


Check if an element is contained is this array range.
param  array search array
param  offset index where to start searching
param  length number of elements to test
param  candidate searched value
return  true if element is in the array range, otherwise return false.
public boolean contains (short[] array, int offset, int length, short candidate)


Check if an element is contained is this array range.
param  array search array
param  offset index where to start searching
param  length number of elements to test
param  candidate searched value
return  true if element is in the array range, otherwise return false.
public boolean contains (int[] array, int offset, int length, int candidate)


Check if an element is contained is this array range.
param  array search array
param  offset index where to start searching
param  length number of elements to test
param  candidate searched value
return  true if element is in the array range, otherwise return false.
public boolean contains (long[] array, int offset, int length, long candidate)


Check if an element is contained is this array range.
param  array search array
param  offset index where to start searching
param  length number of elements to test
param  candidate searched value
return  true if element is in the array range, otherwise return false.
public boolean contains (float[] array, int offset, int length, float candidate)


Check if an element is contained is this array range.
param  array search array
param  offset index where to start searching
param  length number of elements to test
param  candidate searched value
return  true if eleme nt is in the array range, otherwise return false.
public boolean contains (double[] array, int offset, int length, double candidate)


Check if an element is contained is this array range.
param  array search array
param  offset index where to start searching
param  length number of elements to test
param  candidate searched value
return  true if element is in the array range, otherwise return false.
public boolean contains (Object[] array, int offset, int length, Object candidate)


Check if an element is contained is this array range.
Identity test is name using ==
param  array search array
param  offset index where to start searching
param  length number of elements to test
param  candidate searched value
return  true if element is in the array range, otherwise return false.
public boolean containsIdentity (Object[] array, int offset, int length, Object candidate)


Find the first occurrence of given value in the array.
param  array search array
param  offset index where to start searching
param  length number of elements to test
param  candidate searched value
return  candidate index in array, -1 if not found
public int getFirstOccurence (boolean[] array, int offset, int length, boolean candidate)


Find the first occurrence of given value in the array.
param  array search array
param  offset index where to start searching
param  length number of elements to test
param  candidate searched value
return  candidate index in array, -1 if not found
public int getFirstOccurence (char[] array, int offset, int length, char candidate)


Find the first occurrence of given value in the array.
param  array search array
param  offset index where to start searching
param  length number of elements to test
param  candidate searched value
return  candidate index in array, -1 if not found
public int getFirstOccurence (byte[] array, int offset, int length, byte candidate)


Find the first occurrence of given value in the array.
param  array search array
param  offset index where to start searching
param  length number of elements to test
param  candidate searched value
return  candidate index in array, -1 if not found
public int getFirstOccurence (short[] array, int offset, int length, short candidate)


Find the first occurrence of given value in the array.
param  array search array
param  offset index where to start searching
param  length number of elements to test
param  candidate searched value
return  candidate index in array, -1 if not found
public int getFirstOccurence (int[] array, int offset, int length, int candidate)


Find the first occurrence of given value in the array.
param  array search array
param  offset in dex where to start searching
param  length number of elements to test
param  candidate searched value
return  candidate index in array, -1 if not found
public int getFirstOccurence (long[] array, int offset, int length, long candidate)


Find the first occurrence of given value in the array.
param  array search array
param  offset index where to start searching
param  length number of elements to test
param  candidate searched value
return  candidate index in array, -1 if not found
public int getFirstOccurence (float[] array, int offset, int length, float candidate)


Find the first occurrence of given value in the array.
param  array search array
param  offset index where to start searching
param  length number of elements to test
param  candidate searched value
return  candidate index in array, -1 if not found
public int getFirstOccurence (double[] array, int offset, int length, double candidate)


Find the first occurrence of given value in the array.
param  array search array
param  offset index where to start searching
param  length number of elements to test
param  candidate searched value
return  candidate index in array, -1 if not found
public int getFirstOccurence (Object[] array, int offset, int length, Object candidate)


Find the first occurrence of given value in the array.
Identity test is name using ==
param  array search array
param  offset index where to start searching
param  length number of elements to test
param  candidate searched value
return  candidate index in array, -1 if not found
public int getFirstOccurenceIdentity (Object[] array, int offset, int length, Object candidate)



public Chars toChars (Object array)

public Chars toChars (Object array, int maxlength)


Chars representation of given array.
param  array, can be null
return  Chars, never null
public Chars toChars (boolean[] array, int maxLength)


Chars representation of given array.
param  array, can be null
return  Chars, never null
public Chars toChars (byte[] array, int maxLength)


Chars representation of given array.
param  array, can be null
return  Chars, never null
public Chars toChars (short[] array, int maxLength)


Chars representation of given array.
param  array, can be null
return  Chars, never null
public Chars toChars (int[] array, int maxLength)


Chars representation of given array.
param  array, can be null
return  Chars, never null
public Chars toChars (long[] array, int maxLength)


Chars representation of given array.
param  array, can be null
return  Chars, never null
public Chars toChars (float[] array, int maxLength)


Chars representation of given array.
param  array, can be null
return  Chars, never null
public Chars toChars (double[] array, int maxLength)


Chars representation of given array.
param  array, can be null
return  Chars, never null
public Chars toChars (Object[] array, int maxLength)


Chars representation of given array.
In a nice table structure.
param  array, can be null
return  Chars, never null
public Chars toChars (boolean[][] array)


Chars representation of given array.
In a nice table structure.
param  array, can be null
return  Chars, never null
public Chars toChars (byte[][] array)


Chars representation of given array.
In a nice table structure.
param  array, can be null
return  Chars, never null
public Chars toChars (short[][] array)


Chars representation of given array.
In a nice table structure.
param  array, can be null
return  Chars, never null
public Chars toChars (int[][] array)


Chars representation of given array.
In a nice table structure.
param  array, can be null
return  Chars, never null
public Chars toChars (long[][] array)


Chars representation of given array.
In a nice table structure.
param  array, can be null
return  Chars, never null
public Chars toChars (float[][] array)


Chars representation of given array.
In a nice table structure.
param  array, can be null
return  Chars, never null
public Chars toChars (double[][] array)


Chars representation of given array.
In a nice table structure.
param  array, can be null
return  Chars, never null
public Chars toChars (Object[][] array)


Check if an element is contained is this array.
Equality test is made with == .
param  array, can be null.
param  candidate searched value
return  true if element is in the array, otherwise return false.
public boolean identityContains (Object[] array, Object candidate)


Sort given array using QuickSort in-place algorithm.
Average case performance: O(n log n)
Worst case performance: O(n^2)
https://en.wikipedia.org/wiki/Quicksort
param  array the array to be sorted.
param  leftIndex the beginning index array (inclusive)
param  rightIndex the ending index array (inclusive)
public void quickSort (byte[] array, int leftIndex, int rightIndex)


Sort given array using QuickSort in-place algorithm.
Average case performance: O(n log n)
Worst case performance: O(n^2)
https://en.wikipedia.org/wiki/Quicksort
param  array the array to be sorted.
param  leftIndex the beginning index array (inclusive)
param  rightIndex the ending index array (inclusive)
public void quickSort (char[] array, int leftIndex, int rightIndex)


Sort given array using QuickSort in-place algorithm.
Average case performance: O(n log n)
Worst case performance: O(n^2)
https://en.wikipedia.org/wiki/Quicksort
param  array the array to be sorted.
param  leftIndex the beginning index array (inclusive)
param  rightIndex the ending index array (inclusive)
public void quickSort (short[] array, int leftIndex, int rightIndex)


Sort given array using QuickSort in-place algorithm.
Average case performance: O(n log n)
Worst case performance: O(n^2)
https://en.wikipedia.org/wiki/Quicksort
param  array the array to be sorted.
param  leftIndex the beginning index array (inclusive)
param  rightIndex the ending index array (inclusive)
public void quickSort (int[] array, int leftIndex, int rightIndex)


Sort given array using QuickSort in-place algorithm.
Average case performance: O(n log n)
Worst case performance: O(n^2)
https://en.wikipedia.org/wiki/Quicksort
param  array the array to be sorted.
param  leftIndex the beginning index array (inclusive)
param  rightIndex the ending index array (inclusive)
public void quickSort (long[] array, int leftIndex, int rightIndex)


Sort given array using QuickSort in-place algorithm.
Average case performance: O(n log n)
Worst case performance: O(n^2)
https://en.wikipedia.org/wiki/Quicksort
param  array the array to be sorted.
param  leftIndex the beginning index array (inclusive)
param  rightIndex the ending index array (inclusive)
public void quickSort (float[] array, int leftIndex, int rightIndex)


Sort given array using QuickSort in-place algorithm.
Average case performance: O(n log n)
Worst case performance: O(n^2)
https://en.wikipedia.org/wiki/Quicksort
param  array the array to be sorted.
param  leftIndex the beginning index array (inclusive)
param  rightIndex the ending index array (inclusive)
public void quickSort (double[] array, int leftIndex, int rightIndex)


Sort given array (QuickSort algorithm).
param  array the array to be sorted.
public void sort (byte[] array)


Sort given array (QuickSort algorithm).
param  array the array to be sorted.
public void sort (char[] array)


Sort given array (QuickSort algorithm).
param  array the array to be sorted.
public void sort (short[] array)


Sort given array (QuickSort algorithm).
param  array the array to be sorted.
public void sort (int[] array)


Sort given array (QuickSort algorithm).
param  array the array to be sorted.
public void sort (long[] array)


Sort given array (QuickSort algorithm).
param  array the array to be sorted.
public void sort (float[] array)


Sort given array (QuickSort algorithm).
param  array the array to be sorted.
public void sort (double[] array)


Sort given array using QuickSort in-place algorithm.
Average case performance: O(n log n)
Worst case performance: O(n^2)
https://en.wikipedia.org/wiki/Quicksort
param  array the array to be sorted.
param  leftIndex the beginning index array (inclusive)
param  rightIndex the ending index array (inclusive)
public void quickSort (Object[] array, int leftIndex, int rightIndex)


Sort given array (QuickSort algorithm).
param  array the array to be sorted.
public void sort (Object[] array)


Sort given array using QuickSort in-place algorithm using Sorter.
Average case performance: O(n log n)
Worst case performance: O(n^2)
https://en.wikipedia.org/wiki/Quicksort
param  array the array to be sorted.
param  leftIndex the beginning index array (inclusive)
param  rightIndex the ending index array (inclusive)
param  sorter the Sorter
public void quickSort (Object[] array, int leftIndex, int rightIndex, Sorter sorter)


Sort given array using Sorter (QuickSort algorithm).
param  array the array to be sorted.
param  sorter the Sorter
public void sort (Object[] array, Sorter sorter)


Binary search algorithm.
http://en.literateprograms.org/Binary_search_(Java)
Changed from base algorithm to handle insert index before first element.
param  value searched value
param  values array to search in, must be sorted in ascending order
return  if positive value index, if negative insert index = -(val+1)
public int binarySearch (char value, char[] values)


Binary search algorithm.
http://en.literateprograms.org/Binary_search_(Java)
Changed from base algorithm to handle insert index before first element.
param  value searched value
param  values array to search in, must be sorted in ascending order
return  if positive value index, if negative insert index = -(val+1)
public int binarySearch (byte value, byte[] values)


Binary search algorithm.
http://en.literateprograms.org/Binary_search_(Java)
Changed from base algorithm to handle insert index before first element.
param  value searched value
param  values array to search in, must be sorted in ascending order
return  if positive value index, if negative insert index = -(val+1)
public int binarySearch (short value, short[] values)


TODO , find a way to define the right limit value.
public int binarySearch (short value, short[] values, int left, int right)


Binary search algorithm.
http://en.literateprograms.org/Binary_search_(Java)
Changed from base algorithm to handle insert index before first element.
param  value searched value
param  values array to search in, must be sorted in ascending order
return  if positive value index, if negative insert index = -(val+1)
public int binarySearch (int value, int[] values)


TODO , find a way to define the right limit value.
public int binarySearch (int value, int[] values, int left, int right)


Binary search algorithm.
http://en.literateprograms.org/Binary_search_(Java)
Changed from base algorithm to handle insert index before first element.
param  value searched value
param  values array to search in, must be sorted in ascending order
return  if positive value index, if negative insert index = -(val+1)
public int binarySearch (long value, long[] values)


TODO , find a way to define the right limit value.
public int binarySearch (long value, long[] values, int left, int right)


Binary search algorithm.
http://en.literateprograms.org/Binary_search_(Java)
Changed from base algorithm to handle insert index before first element.
param  value searched value
param  values array to search in, must be sorted in ascending order
return  if positive value index, if negative insert index = -(val+1)
public int binarySearch (float value, float[] values)


TODO , find a way to define the right limit value.
public int binarySearch (float value, float[] values, int left, int right)


Binary search algorithm.
http://en.literateprograms.org/Binary_search_(Java)
Changed from base algorithm to handle insert index before first element.
param  value searched value
param  values array to search in, must be sorted in ascending order
return  if positive value index, if negative insert index = -(val+1)
public int binarySearch (double value, double[] values)


TODO , find a way to define the right limit value.
public int binarySearch (double value, double[] values, int left, int right)


Binary search algorithm.
http://en.literateprograms.org/Binary_search_(Java)
Changed from base algorithm to handle insert index before first element.
param  value searched value (must implement Orderable)
param  values array to search in, must be sorted in ascending order and
all elements must implement Orderable.
return  if positive value index, if negative insert index = -(val+1)
public int binarySearch (Object value, Object[] values)


Binary search algorithm.
http://en.literateprograms.org/Binary_search_(Java)
Changed from base algorithm to handle insert index before first element.
If sorter is null, binarySearch(Object value, Object[] values) is called.
param  value searched value
param  values array to search in, must be sorted with the Sorter
param  sorter the Sorter
return  if positive value index, if negative insert index = -(val+1)
public int binarySearch (Object value, Object[] values, Sorter sorter)


Binary search algorithm.
http://en.literateprograms.org/Binary_search_(Java)
Changed from base algorithm to handle insert index before first element.
param  value searched value (must implement Orderable)
param  values collection to search in, must be sorted in ascending order
and all elements must implement Orderable.
return  if positive value index, if negative insert index = -(val+1)
public int binarySearch (Object value, Sequence values)


Binary search algorithm.
http://en.literateprograms.org/Binary_search_(Java)
Changed from base algorithm to handle insert index before first element.
If sorter is null, binarySearch(Object value, Sequence values) is called.
param  value searched value
param  values collection to search in, must be sorted with the Sorter
param  sorter the Sorter
return  if positive value index, if negative insert index = -(val+1)
public int binarySearch (Object value, Sequence values, Sorter sorter)


Test if the source array starts by the given candidate array.
param  source array to test the beginning.
param  candidate start array
param  offset index where to start tests in the candidate array.
param  length of data to test in arrays.
return  true if the source array begins with the given candidate array.
public boolean startsWith (byte[] source, byte[] candidate, int offset, int length)


Test if the source array starts by the given candidate array.
param  source array to test the beginning.
param  candidate start array
param  offset index where to start tests in the candidate array.
param  length of data to test in arrays.
return  true if the source array begins with the given candidate array.
public boolean startsWith (boolean[] source, boolean[] candidate, int offset, int length)


Test if the source array starts by the given candidate array.
param  source array to test the beginning.
param  candidate start array
param  offset index where to start tests in the candidate array.
param  length of data to test in arrays.
return  true if the source array begins with the given candidate array.
public boolean startsWith (char[] source, char[] candidate, int offset, int length)


Test if the source array starts by the given candidate array.
param  source array to test the beginning.
param  candidate start array
param  offset index where to start tests in the candidate array.
param  length of data to test in arrays.
return  true if the source array begins with the given candidate array.
public boolean startsWith (short[] source, short[] candidate, int offset, int length)


Test if the source array starts by the given candidate array.
param  source array to test the beginning.
param  candidate start array
param  offset index where to start tests in the candidate array.
param  length of data to test in arrays.
return  true if the source array begins with the given candidate array.
public boolean startsWith (int[] source, int[] candidate, int offset, int length)


Test if the source array starts by the given candidate array.
param  source array to test the beginning.
param  candidate start array
param  offset index where to start tests in the candidate array.
param  length of data to test in arrays.
return  true if the source array begins with the given candidate array.
public boolean startsWith (long[] source, long[] candidate, int offset, int length)


Test if the source array starts by the given candidate array.
param  source array to test the beginning.
param  candidate start array
param  offset index where to start tests in the candidate array.
param  length of data to test in arrays.
param  tolerance decimal tolerance
return  true if the source array begins with the given candidate array.
public boolean startsWith (float[] source, float[] candidate, int offset, int length, float tolerance)


Test if the source array starts by the given candidate array.
param  source array to test the beginning.
param  candidate start array
param  offset index where to start tests in the candidate array.
param  length of data to test in arrays.
return  true if the source array begins with the given candidate array.
public boolean startsWith (float[] source, float[] candidate, int offset, int length)


Test if the source array starts by the given candidate array.
param  source array to test the beginning.
param  candidate start array
param  offset index where to start tests in the candidate array.
param  length of data to test in arrays.
param  tolerance decimal tolerance
return  true if the source array begins with the given candidate array.
public boolean startsWith (double[] source, double[] candidate, int offset, int length, double tolerance)


Test if the source array starts by the given candidate array.
param  source array to test the beginning.
param  candidate start array
param  offset index where to start tests in the candidate array.
param  length of data to test in arrays.
return  true if the source array begins with the given candidate array.
public boolean startsWith (double[] source, double[] candidate, int offset, int length)


Test if the source array starts by the given candidate array.
param  source array to test the beginning.
param  candidate start array
param  offset index where to start tests in the candidate array.
param  length of data to test in arrays.
return  true if the source array begins with the given candidate array.
public boolean startsWith (Object[] source, Object[] candidate, int offset, int length)


Test if the source array starts by the given candidate array.
param  source array to test the beginning.
param  candidate start array
return  true if the source array begins with the given candidate array.
public boolean startsWith (byte[] source, byte[] candidate)


Test if the source array starts by the given candidate array.
param  source array to test the beginning.
param  candidate start array
return  true if the source array begins with the given candidate array.
public boolean startsWith (boolean[] source, boolean[] candidate)


Test if the source array starts by the given candidate array.
param  source array to test the beginning.
param  candidate start array
return  true if the source array begins with the given candidate array.
public boolean startsWith (char[] source, char[] candidate)


Test if the source array starts by the given candidate array.
param  source array to test the beginning.
param  candidate start array
return  true if the source array begins with the given candidate array.
public boolean startsWith (short[] source, short[] candidate)


Test if the source array starts by the given candidate array.
param  source array to test the beginning.
param  candidate start array
return  true if the source array begins with the given candidate array.
public boolean startsWith (int[] source, int[] candidate)


Test if the source array starts by the given candidate array.
param  source array to test the beginning.
param  candidate start array
return  true if the source array begins with the given candidate array.
public boolean startsWith (long[] source, long[] candidate)


Test if the source array starts by the given candidate array.
param  source array to test the beginning.
param  candidate start array
param  tolerance decimal tolerance
return  true if the source array begins with the given candidate array.
public boolean startsWith (float[] source, float[] candidate, float tolerance)


Test if the source array starts by the given candidate array.
param  source array to test the beginning.
param  candidate start array
return  true if the source array begins with the given candidate array.
public boolean startsWith (float[] source, float[] candidate)


Test if the source array starts by the given candidate array.
param  source array to test the beginning.
param  candidate start array
param  tolerance decimal tolerance
return  true if the source array begins with the given candidate array.
public boolean startsWith (double[] source, double[] candidate, double tolerance)


Test if the source array starts by the given candidate array.
param  source array to test the beginning.
param  candidate start array
return  true if the source array begins with the given candidate array.
public boolean startsWith (double[] source, double[] candidate)


Test if the source array starts by the given candidate array.
param  source array to test the beginning.
param  candidate start array
return  true if the source array begins with the given candidate array.
public boolean startsWith (Object[] source, Object[] candidate)


Test if the source array ends by the given candidate array.
param  source array to test the ending.
param  candidate end array
param  offset index where to start tests in the candidate array.
param  length of data to test in arrays.
return  true if the source array ends with the given candidate array.
public boolean endsWith (byte[] source, byte[] candidate, int offset, int length)


Test if the source array ends by the given candidate array.
param  source array to test the ending.
param  candidate end array
param  offset index where to start tests in the candidate array.
param  length of data to test in arrays.
return  true if the source array ends with the given candidate array.
public boolean endsWith (boolean[] source, boolean[] candidate, int offset, int length)


Test if the source array ends by the given candidate array.
param  source array to test the ending.
param  candidate end array
param  offset index where to start tests in the candidate array.
param  length of data to test in arrays.
return  true if the source array ends with the given candidate array.
public boolean endsWith (char[] source, char[] candidate, int offset, int length)


Test if the source array ends by the given candidate array.
param  source array to test the ending.
param  candidate end array
param  offset index where to start tests in the candidate array.
param  length of data to test in arrays.
return  true if the source array ends with the given candidate array.
public boolean endsWith (short[] source, short[] candidate, int offset, int length)


Test if the source array ends by the given candidate array.
param  source array to test the ending.
param  candidate end array
param  offset index where to start tests in the candidate array.
param  length of data to test in arrays.
return  true if the source array ends with the given candidate array.
public boolean endsWith (int[] source, int[] candidate, int offset, int length)


Test if the source array ends by the given candidate array.
param  source array to test the ending.
param  candidate end array
param  offset index where to start tests in the candidate array.
param  length of data to test in arrays.
return  true if the source array ends with the given candidate array.
public boolean endsWith (long[] source, long[] candidate, int offset, int length)


Test if the source array ends by the given candidate array.
param  source array to test the ending.
param  candidate end array
param  offset index where to start tests in the candidate array.
param  length of data to test in arrays.
param  tolerance decimal tolerance
return  true if the source array ends with the given candidate array.
public boolean endsWith (float[] source, float[] candidate, int offset, int length, float tolerance)


Test if the source array ends by the given candidate array.
param  source array to test the ending.
param  candidate end array
param  offset index where to start tests in the candidate array.
param  length of data to test in arrays.
return  true if the source array ends with the given candidate array.
public boolean endsWith (float[] source, float[] candidate, int offset, int length)


Test if the source array ends by the given candidate array.
param  source array to test the ending.
param  candidate end array
param  offset index where to start tests in the candidate array.
param  length of data to test in arrays.
param  tolerance decimal tolerance
return  true if the source array ends with the given candidate array.
public boolean endsWith (double[] source, double[] candidate, int offset, int length, double tolerance)


Test if the source array ends by the given candidate array.
param  source array to test the ending.
param  candidate end array
param  offset index where to start tests in the candidate array.
param  length of data to test in arrays.
return  true if the source array ends with the given candidate array.
public boolean endsWith (double[] source, double[] candidate, int offset, int length)


Test if the source array ends by the given candidate array.
param  source array to test the ending.
param  candidate end array
param  offset index where to start tests in the candidate array.
param  length of data to test in arrays.
return  true if the source array ends with the given candidate array.
public boolean endsWith (Object[] source, Object[] candidate, int offset, int length)


Test if the source array ends by the given candidate array.
param  source array to test the ending.
param  candidate end array
return  true if the source array ends with the given candidate array.
public boolean endsWith (byte[] source, byte[] candidate)


Test if the source array ends by the given candidate array.
param  source array to test the ending.
param  candidate end array
return  true if the source array ends with the given candidate array.
public boolean endsWith (boolean[] source, boolean[] candidate)


Test if the source array ends by the given candidate array.
param  source array to test the ending.
param  candidate end array
return  true if the source array ends with the given candidate array.
public boolean endsWith (char[] source, char[] candidate)


Test if the source array ends by the given candidate array.
param  source array to test the ending.
param  candidate end array
return  true if the source array ends with the given candidate array.
public boolean endsWith (short[] source, short[] candidate)


Test if the source array ends by the given candidate array.
param  source array to test the ending.
param  candidate end array
return  true if the source array ends with the given candidate array.
public boolean endsWith (int[] source, int[] candidate)


Test if the source array ends by the given candidate array.
param  source array to test the ending.
param  candidate end array
return  true if the source array ends with the given candidate array.
public boolean endsWith (long[] source, long[] candidate)


Test if the source array ends by the given candidate array.
param  source array to test the ending.
param  candidate end array
param  tolerance decimal tolerance
return  true if the source array ends with the given candidate array.
public boolean endsWith (float[] source, float[] candidate, float tolerance)


Test if the source array ends by the given candidate array.
param  source array to test the ending.
param  candidate end array
return  true if the source array ends with the given candidate array.
public boolean endsWith (float[] source, float[] candidate)


Test if the source array ends by the given candidate array.
param  source array to test the ending.
param  candidate end array
param  tolerance decimal tolerance
return  true if the source array ends with the given candidate array.
public boolean endsWith (double[] source, double[] candidate, double tolerance)


Test if the source array ends by the given candidate array.
param  source array to test the ending.
param  candidate end array
return  true if the source array ends with the given candidate array.
public boolean endsWith (double[] source, double[] candidate)


Test if the source array ends by the given candidate array.
param  source array to test the ending.
param  candidate end array
return  true if the source array ends with the given candidate array.
public boolean endsWith (Object[] source, Object[] candidate)


Convert float array in a double array.
param  source
return  double array
public double[] reformatDouble (float[] source)


Convert int array in a double array.
param  source
return  double array
public double[] reformatToDouble (int[] source)


Convert float array in a double array.
param  source
return  double array
public double[] reformatToDouble (float[] source)


Convert int array in a float array.
param  source
return  float array
public float[] reformatToFloat (int[] source)


Convert double array in a float array.
Warning : loss of precision
param  source
return  float array
public float[] reformatToFloat (double[] source)


Convert int array in a long array.
Warning : loss of precision
param  source
return  long array
public long[] reformatToLong (int[] source)


Convert double array in a int array.
Warning : loss of precision
param  source
return  int array
public int[] reformatToInt (double[] source)


Convert float array in a int array.
Warning : loss of precision
param  source
return  int array
public int[] reformatToInt (float[] source)


Convert long array in a int array.
param  source
return  int array
public int[] reformatToInt (long[] source)


Convert short array in a int array.
param  source
return  int array
public int[] reformatToInt (short[] source)


Convert int array in a double array.
param  source
return  double array
public int[] reformatToInt (byte[] source)


Convert int array in a short array.
param  source
return  short array
public short[] reformatToShort (int[] source)


Convert int array in a double array.
param  source
return  double array
public byte[] reformatToByte (int[] source)


XOR length elements of source from the index sourceIndex with elements of target from the index targetIndex.
The result is put in target from index targetIndex.
param  source source array.
param  sourceIndex source offset.
param  target target array
param  targetIndex target offset.
param  length number of elements to XOR.
public void arrayXOR (byte[] source, int sourceIndex, byte[] target, int targetIndex, int length)