public class ArrayUtil extends java.lang.Object
Array1DUtil
,
Array2DUtil
,
Array3DUtil
,
ByteArrayConvert
Constructor and Description |
---|
ArrayUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
allocIfNull(java.lang.Object array,
ArrayType arrayType,
int len)
Allocate the specified array if it's defined to null with the specified len
|
static java.lang.String |
array1DToString(java.lang.Object array,
boolean signed,
boolean hexa,
java.lang.String separator,
int size)
Return the specified 1D array as string
ex : [0,1,2,3,4] --> "0:1:2:3:4" |
static boolean |
arrayCompare(java.lang.Object array1,
java.lang.Object array2)
Return true if the specified array are equals (same type, dimension and data).
|
static java.lang.Object |
arrayToArray(java.lang.Object in,
int inOffset,
java.lang.Object out,
int outOffset,
int length,
boolean signed)
Convert and return the 'in' array in 'out' array type.
|
static java.lang.Object |
arrayToArray(java.lang.Object in,
java.lang.Object out,
boolean signed)
Convert and return the 'in' array in 'out' array type.
|
static java.lang.Object |
arrayToByteArray(java.lang.Object array) |
static byte[] |
arrayToByteArray1D(java.lang.Object in)
Deprecated.
use Array1DUtil.arrayToByteArray instead
|
static byte[] |
arrayToByteArray1D(java.lang.Object in,
byte[] out)
Deprecated.
use Array1DUtil.arrayToByteArray instead
|
static byte[] |
arrayToByteArray1D(java.lang.Object in,
int inOffset,
byte[] out,
int outOffset,
int length)
Deprecated.
use Array1DUtil.arrayToByteArray instead
|
static byte[][] |
arrayToByteArray2D(java.lang.Object in)
Deprecated.
use Array2DUtil.arrayToByteArray instead
|
static byte[][] |
arrayToByteArray2D(java.lang.Object in,
byte[][] out)
Deprecated.
use Array2DUtil.arrayToByteArray instead
|
static byte[][] |
arrayToByteArray2D(java.lang.Object in,
int inOffset,
byte[][] out,
int outOffset,
int length)
Deprecated.
use Array2DUtil.arrayToByteArray instead
|
static java.lang.Object |
arrayToDoubleArray(java.lang.Object array,
boolean signed) |
static double[] |
arrayToDoubleArray1D(java.lang.Object in,
boolean signed)
Deprecated.
use Array1DUtil.arrayToDoubleArray instead
|
static double[] |
arrayToDoubleArray1D(java.lang.Object in,
double[] out,
boolean signed)
Deprecated.
use Array1DUtil.arrayToDoubleArray instead
|
static double[] |
arrayToDoubleArray1D(java.lang.Object in,
int inOffset,
double[] out,
int outOffset,
int length,
boolean signed)
Deprecated.
use Array1DUtil.arrayToDoubleArray instead
|
static double[][] |
arrayToDoubleArray2D(java.lang.Object in,
boolean signed)
Deprecated.
use Array2DUtil.arrayToDoubleArray instead
|
static double[][] |
arrayToDoubleArray2D(java.lang.Object in,
double[][] out,
boolean signed)
Deprecated.
use Array2DUtil.arrayToDoubleArray instead
|
static double[][] |
arrayToDoubleArray2D(java.lang.Object in,
int inOffset,
double[][] out,
int outOffset,
int length,
boolean signed)
Deprecated.
use Array2DUtil.arrayToDoubleArray instead
|
static java.lang.Object |
arrayToFloatArray(java.lang.Object array,
boolean signed) |
static float[] |
arrayToFloatArray1D(java.lang.Object in,
boolean signed)
Deprecated.
use Array1DUtil.arrayToFloatArray instead
|
static float[] |
arrayToFloatArray1D(java.lang.Object in,
float[] out,
boolean signed)
Deprecated.
use Array1DUtil.arrayToFloatArray instead
|
static float[] |
arrayToFloatArray1D(java.lang.Object in,
int inOffset,
float[] out,
int outOffset,
int length,
boolean signed)
Deprecated.
use Array1DUtil.arrayToFloatArray instead
|
static float[][] |
arrayToFloatArray2D(java.lang.Object in,
boolean signed)
Deprecated.
use Array2DUtil.arrayToFloatArray instead
|
static float[][] |
arrayToFloatArray2D(java.lang.Object in,
float[][] out,
boolean signed)
Deprecated.
use Array2DUtil.arrayToFloatArray instead
|
static float[][] |
arrayToFloatArray2D(java.lang.Object in,
int inOffset,
float[][] out,
int outOffset,
int length,
boolean signed)
Deprecated.
use Array2DUtil.arrayToFloatArray instead
|
static java.lang.Object |
arrayToIntArray(java.lang.Object array,
boolean signed) |
static int[] |
arrayToIntArray1D(java.lang.Object in,
boolean signed)
Deprecated.
use Array1DUtil.arrayToIntArray instead
|
static int[] |
arrayToIntArray1D(java.lang.Object in,
int[] out,
boolean signed)
Deprecated.
use Array1DUtil.arrayToIntArray instead
|
static int[] |
arrayToIntArray1D(java.lang.Object in,
int inOffset,
int[] out,
int outOffset,
int length,
boolean signed)
Deprecated.
use Array1DUtil.arrayToIntArray instead
|
static int[][] |
arrayToIntArray2D(java.lang.Object in,
boolean signed)
Deprecated.
use Array2DUtil.arrayToIntArray instead
|
static int[][] |
arrayToIntArray2D(java.lang.Object in,
int[][] out,
boolean signed)
Deprecated.
use Array2DUtil.arrayToIntArray instead
|
static int[][] |
arrayToIntArray2D(java.lang.Object in,
int inOffset,
int[][] out,
int outOffset,
int length,
boolean signed)
Deprecated.
use Array2DUtil.arrayToIntArray instead
|
static java.lang.Object |
arrayToLongArray(java.lang.Object array,
boolean signed) |
static java.lang.Object |
arrayToSafeArray(java.lang.Object in,
int inOffset,
java.lang.Object out,
int outOffset,
int length,
boolean signed)
Deprecated.
|
static java.lang.Object |
arrayToSafeArray(java.lang.Object in,
int inOffset,
java.lang.Object out,
int outOffset,
int length,
boolean srcSigned,
boolean dstSigned)
Safely converts the input array in the output array data type.
|
static java.lang.Object |
arrayToSafeArray(java.lang.Object in,
java.lang.Object out,
boolean signed)
Deprecated.
Use
arrayToSafeArray(Object, Object, boolean, boolean) instead. |
static java.lang.Object |
arrayToSafeArray(java.lang.Object in,
java.lang.Object out,
boolean srcSigned,
boolean dstSigned)
Safely converts the input array in the output array data type.
|
static java.lang.Object |
arrayToSafeByteArray(java.lang.Object array,
boolean signed) |
static byte[] |
arrayToSafeByteArray1D(java.lang.Object in,
byte[] out,
boolean signed)
Deprecated.
use Array1DUtil.arrayToSafeByteArray instead
|
static byte[] |
arrayToSafeByteArray1D(java.lang.Object in,
int inOffset,
byte[] out,
int outOffset,
int length,
boolean signed)
Deprecated.
use Array1DUtil.arrayToSafeByteArray instead
|
static byte[][] |
arrayToSafeByteArray2D(java.lang.Object in,
byte[][] out,
boolean signed)
Deprecated.
use Array2DUtil.arrayToSafeByteArray instead
|
static byte[][] |
arrayToSafeByteArray2D(java.lang.Object in,
int inOffset,
byte[][] out,
int outOffset,
int length,
boolean signed)
Deprecated.
use Array2DUtil.arrayToSafeByteArray instead
|
static java.lang.Object |
arrayToSafeIntArray(java.lang.Object array,
boolean signed) |
static int[] |
arrayToSafeIntArray1D(java.lang.Object in,
int[] out,
boolean signed)
Deprecated.
use Array1DUtil.arrayToSafeIntArray instead
|
static int[] |
arrayToSafeIntArray1D(java.lang.Object in,
int inOffset,
int[] out,
int outOffset,
int length,
boolean signed)
Deprecated.
use Array1DUtil.arrayToSafeIntArray instead
|
static int[][] |
arrayToSafeIntArray2D(java.lang.Object in,
int[][] out,
boolean signed)
Deprecated.
use Array2DUtil.arrayToSafeIntArray instead
|
static int[][] |
arrayToSafeIntArray2D(java.lang.Object in,
int inOffset,
int[][] out,
int outOffset,
int length,
boolean signed)
Deprecated.
use Array2DUtil.arrayToSafeIntArray instead
|
static java.lang.Object |
arrayToSafeLongArray(java.lang.Object array,
boolean signed) |
static java.lang.Object |
arrayToSafeShortArray(java.lang.Object array,
boolean signed) |
static short[] |
arrayToSafeShortArray1D(java.lang.Object in,
int inOffset,
short[] out,
int outOffset,
int length,
boolean signed)
Deprecated.
use Array1DUtil.arrayToSafeShortArray instead
|
static short[] |
arrayToSafeShortArray1D(java.lang.Object in,
short[] out,
boolean signed)
Deprecated.
use Array1DUtil.arrayToSafeShortArray instead
|
static short[][] |
arrayToSafeShortArray2D(java.lang.Object in,
int inOffset,
short[][] out,
int outOffset,
int length,
boolean signed)
Deprecated.
use Array2DUtil.arrayToSafeShortArray instead
|
static short[][] |
arrayToSafeShortArray2D(java.lang.Object in,
short[][] out,
boolean signed)
Deprecated.
use Array2DUtil.arrayToSafeShortArray instead
|
static java.lang.Object |
arrayToShortArray(java.lang.Object array,
boolean signed) |
static short[] |
arrayToShortArray1D(java.lang.Object in,
boolean signed)
Deprecated.
use Array1DUtil.arrayToShortArray instead
|
static short[] |
arrayToShortArray1D(java.lang.Object in,
int inOffset,
short[] out,
int outOffset,
int length,
boolean signed)
Deprecated.
use Array1DUtil.arrayToShortArray instead
|
static short[] |
arrayToShortArray1D(java.lang.Object in,
short[] out,
boolean signed)
Deprecated.
use Array1DUtil.arrayToShortArray instead
|
static short[][] |
arrayToShortArray2D(java.lang.Object in,
boolean signed)
Deprecated.
use Array2DUtil.arrayToShortArray instead
|
static short[][] |
arrayToShortArray2D(java.lang.Object in,
int inOffset,
short[][] out,
int outOffset,
int length,
boolean signed)
Deprecated.
use Array2DUtil.arrayToShortArray instead
|
static short[][] |
arrayToShortArray2D(java.lang.Object in,
short[][] out,
boolean signed)
Deprecated.
use Array2DUtil.arrayToShortArray instead
|
static java.lang.String |
arrayToString(java.lang.Object array)
Return the specified array as string
Default representation use ':' as separator character ex : [0,1,2,3,4] --> "0:1:2:3:4" |
static boolean |
arrayTypeCompare(java.lang.Object array1,
java.lang.Object array2)
Return true if the specified array has the same data type
and the same number of dimension. |
static java.lang.Object |
byteArrayToArray1D(byte[] in,
int inOffset,
java.lang.Object out,
int outOffset,
int length,
boolean signed)
Deprecated.
use Array1DUtil.byteArrayToArray instead
|
static java.lang.Object |
byteArrayToArray2D(byte[][] in,
int inOffset,
java.lang.Object out,
int outOffset,
int length,
boolean signed)
Deprecated.
use Array2DUtil.byteArrayToArray instead
|
static java.lang.Object |
byteArrayToArray2D(byte[][] in,
java.lang.Object out,
boolean signed)
Deprecated.
use Array2DUtil.byteArrayToArray instead
|
static java.lang.Object |
createArray(ArrayType arrayType,
int len)
Allocate the specified array data type with specified len for the first dimension
|
static java.lang.Object |
createArray(DataType dataType,
int dim,
int len)
Allocate the specified array data type with specified number of dimension.
|
static java.lang.Object |
createArray1D(int dataType,
int len)
Deprecated.
use
Array1DUtil.createArray(icy.type.DataType, int) instead |
static java.lang.Object |
createArray2D(int dataType,
int len)
Deprecated.
use
Array2DUtil.createArray(icy.type.DataType, int) instead |
static java.lang.Object |
createArray3D(int dataType,
int len)
Deprecated.
use
Array2DUtil.createArray(int, int) instead |
static double[] |
createLinearDoubleArray(int size,
double initialValue,
double step)
Creates a linear array with specified size, initial value and step.
|
static int[] |
createLinearIntArray(int size,
int initialValue,
int step)
Creates a linear array with specified size, initial value and step.
|
static java.lang.Object |
doubleArrayToArray1D(double[] in,
int inOffset,
java.lang.Object out,
int outOffset,
int length)
Deprecated.
use Array1DUtil.doubleArrayToArray instead
|
static java.lang.Object |
doubleArrayToArray1D(double[] in,
java.lang.Object out)
Deprecated.
use Array1DUtil.doubleArrayToArray instead
|
static java.lang.Object |
doubleArrayToArray2D(double[][] in,
int inOffset,
java.lang.Object out,
int outOffset,
int length)
Deprecated.
use Array2DUtil.doubleArrayToArray instead
|
static java.lang.Object |
doubleArrayToArray2D(double[][] in,
java.lang.Object out)
Deprecated.
use Array2DUtil.doubleArrayToArray instead
|
static java.lang.Object |
doubleArrayToSafeArray1D(double[] in,
int inOffset,
java.lang.Object out,
int outOffset,
int length,
boolean signed)
Deprecated.
use Array1DUtil.doubleArrayToSafeArray instead
|
static java.lang.Object |
doubleArrayToSafeArray1D(double[] in,
java.lang.Object out,
boolean signed)
Deprecated.
use Array1DUtil.doubleArrayToSafeArray instead
|
static java.lang.Object |
doubleArrayToSafeArray2D(double[][] in,
int inOffset,
java.lang.Object out,
int outOffset,
int length,
boolean signed)
Deprecated.
use Array2DUtil.doubleArrayToSafeArray instead
|
static java.lang.Object |
doubleArrayToSafeArray2D(double[][] in,
java.lang.Object out,
boolean signed)
Deprecated.
use Array2DUtil.doubleArrayToSafeArray instead
|
static java.lang.Object[] |
encapsulate(java.lang.Object array)
Encapsulate the specified array with a single cell array of the same type.
|
static void |
fill(java.lang.Object array,
int from,
int to,
double value)
Deprecated.
Use
Array1DUtil.fill(Object, int, int, double) instead. |
static java.lang.Object |
floatArrayToArray1D(float[] in,
int inOffset,
java.lang.Object out,
int outOffset,
int length)
Deprecated.
use Array1DUtil.floatArrayToArray instead
|
static java.lang.Object |
floatArrayToArray1D(float[] in,
java.lang.Object out)
Deprecated.
use Array1DUtil.floatArrayToArray instead
|
static java.lang.Object |
floatArrayToArray2D(float[][] in,
int inOffset,
java.lang.Object out,
int outOffset,
int length)
Deprecated.
use Array2DUtil.floatArrayToArray instead
|
static java.lang.Object |
floatArrayToArray2D(float[][] in,
java.lang.Object out)
Deprecated.
use Array2DUtil.floatArrayToArray instead
|
static java.lang.Object |
floatArrayToSafeArray1D(float[] in,
int inOffset,
java.lang.Object out,
int outOffset,
int length,
boolean signed)
Deprecated.
use Array1DUtil.floatArrayToSafeArray instead
|
static java.lang.Object |
floatArrayToSafeArray1D(float[] in,
java.lang.Object out,
boolean signed)
Deprecated.
use Array1DUtil.floatArrayToSafeArray instead
|
static java.lang.Object |
floatArrayToSafeArray2D(float[][] in,
int inOffset,
java.lang.Object out,
int outOffset,
int length,
boolean signed)
Deprecated.
use Array2DUtil.floatArrayToSafeArray instead
|
static java.lang.Object |
floatArrayToSafeArray2D(float[][] in,
java.lang.Object out,
boolean signed)
Deprecated.
use Array2DUtil.floatArrayToSafeArray instead
|
static ArrayDataType |
getArrayDataType(java.lang.Object array)
Deprecated.
Use
getArrayType(Object) instead |
static ArrayType |
getArrayType(java.lang.Object array)
Returns the
ArrayType of the specified array. |
static int |
getCopyLength(java.lang.Object array,
int offset)
Get length for a copy from or to the specified array with specified offset
|
static int |
getCopyLength(java.lang.Object in,
int inOffset,
java.lang.Object out,
int outOffset)
Get maximum length for a copy from in to out with specified offset.
|
static DataType |
getDataType(java.lang.Object array)
Return the DataType (java type only) of the specified array.
|
static DataType |
getDataType(java.lang.Object array,
boolean signed)
Return the DataType of the specified array
|
static int |
getDim(java.lang.Object array)
Return the number of dimension of the specified array
|
static int |
getLenght(java.lang.Object array)
Deprecated.
use
getLength(Object) instead |
static int |
getLength(java.lang.Object array)
Return the number of element of the specified array
|
static int |
getTotalLenght(java.lang.Object array)
Deprecated.
use
getTotalLength(Object) instead |
static int |
getTotalLength(java.lang.Object array)
Return the total number of element of the specified array
|
static double |
getValue(java.lang.Object array,
int offset,
boolean signed)
Deprecated.
use
Array1DUtil.getValue(Object, int, boolean) instead |
static double |
getValue(java.lang.Object array,
int offset,
int dataType,
boolean signed)
Deprecated.
use
Array1DUtil.getValue(Object, int, int, boolean) instead |
static float |
getValueAsFloat(java.lang.Object array,
int offset,
boolean signed)
Deprecated.
|
static float |
getValueAsFloat(java.lang.Object array,
int offset,
int dataType,
boolean signed)
Deprecated.
|
static int |
getValueAsInt(java.lang.Object array,
int offset,
boolean signed)
Deprecated.
use
Array1DUtil.getValueAsInt(Object, int, boolean) instead |
static int |
getValueAsInt(java.lang.Object array,
int offset,
int dataType,
boolean signed)
Deprecated.
|
static void |
innerCopy(java.lang.Object array,
int from,
int to,
int cnt)
Deprecated.
Use
Array1DUtil.innerCopy(Object, int, int, int) instead. |
static java.lang.Object |
intArrayToArray1D(int[] in,
int inOffset,
java.lang.Object out,
int outOffset,
int length,
boolean signed)
Deprecated.
use Array1DUtil.intArrayToArray instead
|
static java.lang.Object |
intArrayToArray1D(int[] in,
java.lang.Object out,
boolean signed)
Deprecated.
use Array1DUtil.intArrayToArray instead
|
static java.lang.Object |
intArrayToArray2D(int[][] in,
int inOffset,
java.lang.Object out,
int outOffset,
int length,
boolean signed)
Deprecated.
use Array2DUtil.intArrayToArray instead
|
static java.lang.Object |
intArrayToArray2D(int[][] in,
java.lang.Object out,
boolean signed)
Deprecated.
use Array2DUtil.intArrayToArray instead
|
static java.lang.Object |
intArrayToSafeArray1D(int[] in,
int inOffset,
java.lang.Object out,
int outOffset,
int length,
boolean signed)
Deprecated.
use Array1DUtil.intArrayToSafeArray instead
|
static java.lang.Object |
intArrayToSafeArray1D(int[] in,
java.lang.Object out,
boolean signed)
Deprecated.
use Array1DUtil.intArrayToSafeArray instead
|
static java.lang.Object |
intArrayToSafeArray2D(int[][] in,
int inOffset,
java.lang.Object out,
int outOffset,
int length,
boolean signed)
Deprecated.
use Array2DUtil.intArrayToSafeArray instead
|
static java.lang.Object |
intArrayToSafeArray2D(int[][] in,
java.lang.Object out,
boolean signed)
Deprecated.
use Array2DUtil.intArrayToSafeArray instead
|
static void |
setValue(java.lang.Object array,
int offset,
double value)
Deprecated.
use
Array1DUtil.setValue(Object, int, double) instead |
static void |
setValue(java.lang.Object array,
int offset,
int dataType,
double value)
Deprecated.
use
Array1DUtil.setValue(Object, int, int,double) instead |
static java.lang.Object |
shortArrayToArray1D(short[] in,
int inOffset,
java.lang.Object out,
int outOffset,
int length,
boolean signed)
Deprecated.
use Array1DUtil.shortArrayToArray instead
|
static java.lang.Object |
shortArrayToArray1D(short[] in,
java.lang.Object out,
boolean signed)
Deprecated.
use Array1DUtil.shortArrayToArray instead
|
static java.lang.Object |
shortArrayToArray2D(short[][] in,
int inOffset,
java.lang.Object out,
int outOffset,
int length,
boolean signed)
Deprecated.
use Array2DUtil.shortArrayToArray instead
|
static java.lang.Object |
shortArrayToArray2D(short[][] in,
java.lang.Object out,
boolean signed)
Deprecated.
use Array2DUtil.shortArrayToArray instead
|
static java.lang.Object |
shortArrayToSafeArray1D(short[] in,
int inOffset,
java.lang.Object out,
int outOffset,
int length,
boolean signed)
Deprecated.
use Array1DUtil.shortArrayToSafeArray instead
|
static java.lang.Object |
shortArrayToSafeArray1D(short[] in,
java.lang.Object out,
boolean signed)
Deprecated.
use Array1DUtil.shortArrayToSafeArray instead
|
static java.lang.Object |
shortArrayToSafeArray2D(short[][] in,
int inOffset,
java.lang.Object out,
int outOffset,
int length,
boolean signed)
Deprecated.
use Array2DUtil.shortArrayToSafeArray instead
|
static java.lang.Object |
shortArrayToSafeArray2D(short[][] in,
java.lang.Object out,
boolean signed)
Deprecated.
use Array2DUtil.shortArrayToSafeArray instead
|
static java.lang.Object |
stringToArray1D(java.lang.String value,
DataType dataType)
Return the specified string containing separated values as a 1D array
By default separator is assumed to be ':' character ex : "0:1:2:3:4" --> [0,1,2,3,4] |
static java.lang.Object |
stringToArray1D(java.lang.String value,
DataType dataType,
boolean hexa,
java.lang.String separator)
Return the specified string containing separated values as a 1D array
ex : "0:1:2:3:4" --> [0,1,2,3,4] |
static java.lang.Object |
stringToArray1D(java.lang.String value,
int dataType)
Deprecated.
use
stringToArray1D(String, DataType) instead |
static java.lang.Object |
stringToArray1D(java.lang.String value,
int dataType,
boolean hexa,
java.lang.String separator)
Deprecated.
|
static java.lang.Object |
toArray1D(java.lang.Object in,
java.lang.Object out,
int offset)
Transform the multi dimension 'in' array as a single dimension array.
|
static boolean[] |
toBooleanArray1D(byte[] array)
Deprecated.
use
Array1DUtil.toBooleanArray(byte[]) instead |
static boolean[] |
toBooleanArray1D(byte[] in,
boolean[] out,
int offset)
Deprecated.
|
static byte[] |
toByteArray1D(boolean[] array)
Deprecated.
use
Array1DUtil.toByteArray(boolean[]) instead |
static byte[] |
toByteArray1D(boolean[] in,
byte[] out,
int offset)
Deprecated.
use
Array1DUtil.toByteArray(boolean[], byte[], int) instead |
public ArrayUtil()
@Deprecated public static ArrayDataType getArrayDataType(java.lang.Object array)
getArrayType(Object)
insteadpublic static ArrayType getArrayType(java.lang.Object array)
ArrayType
of the specified array.public static int getDim(java.lang.Object array)
public static DataType getDataType(java.lang.Object array)
DataType
public static DataType getDataType(java.lang.Object array, boolean signed)
public static int getLength(java.lang.Object array)
@Deprecated public static int getLenght(java.lang.Object array)
getLength(Object)
insteadpublic static int getTotalLength(java.lang.Object array)
@Deprecated public static int getTotalLenght(java.lang.Object array)
getTotalLength(Object)
instead@Deprecated public static java.lang.Object createArray1D(int dataType, int len)
Array1DUtil.createArray(icy.type.DataType, int)
instead@Deprecated public static java.lang.Object createArray2D(int dataType, int len)
Array2DUtil.createArray(icy.type.DataType, int)
instead@Deprecated public static java.lang.Object createArray3D(int dataType, int len)
Array2DUtil.createArray(int, int)
insteadpublic static java.lang.Object createArray(DataType dataType, int dim, int len)
dataType
- array data typedim
- number of dimension of the allocated arraylen
- size of first dimensionpublic static java.lang.Object createArray(ArrayType arrayType, int len)
public static java.lang.Object allocIfNull(java.lang.Object array, ArrayType arrayType, int len)
public static java.lang.Object[] encapsulate(java.lang.Object array)
@Deprecated public static double getValue(java.lang.Object array, int offset, boolean signed)
Array1DUtil.getValue(Object, int, boolean)
instead@Deprecated public static double getValue(java.lang.Object array, int offset, int dataType, boolean signed)
Array1DUtil.getValue(Object, int, int, boolean)
instead@Deprecated public static float getValueAsFloat(java.lang.Object array, int offset, boolean signed)
Array1DUtil.getValueAsFloat(Object, int, boolean)
instead@Deprecated public static float getValueAsFloat(java.lang.Object array, int offset, int dataType, boolean signed)
Array1DUtil.getValueAsFloat(Object, int,int, boolean)
instead@Deprecated public static int getValueAsInt(java.lang.Object array, int offset, boolean signed)
Array1DUtil.getValueAsInt(Object, int, boolean)
instead@Deprecated public static int getValueAsInt(java.lang.Object array, int offset, int dataType, boolean signed)
Array1DUtil.getValueAsInt(Object, int, int, boolean)
instead@Deprecated public static void setValue(java.lang.Object array, int offset, double value)
Array1DUtil.setValue(Object, int, double)
instead@Deprecated public static void setValue(java.lang.Object array, int offset, int dataType, double value)
Array1DUtil.setValue(Object, int, int,double)
insteadpublic static boolean arrayTypeCompare(java.lang.Object array1, java.lang.Object array2)
public static boolean arrayCompare(java.lang.Object array1, java.lang.Object array2)
@Deprecated public static void fill(java.lang.Object array, int from, int to, double value)
Array1DUtil.fill(Object, int, int, double)
instead.@Deprecated public static void innerCopy(java.lang.Object array, int from, int to, int cnt)
Array1DUtil.innerCopy(Object, int, int, int)
instead.public static java.lang.Object toArray1D(java.lang.Object in, java.lang.Object out, int offset)
public static int getCopyLength(java.lang.Object in, int inOffset, java.lang.Object out, int outOffset)
public static int getCopyLength(java.lang.Object array, int offset)
public static java.lang.Object arrayToArray(java.lang.Object in, int inOffset, java.lang.Object out, int outOffset, int length, boolean signed)
in
- input arrayinOffset
- position where we start read data fromout
- output array which is used to receive result (and so define wanted type)outOffset
- position where we start to write data tolength
- number of value to convert (-1 means we will use the maximum possible length)signed
- if input data are integer type then we assume them as signed datapublic static java.lang.Object arrayToArray(java.lang.Object in, java.lang.Object out, boolean signed)
in
- input arrayout
- output array which is used to receive result (and so define wanted type)signed
- if input data are integer type then we assume them as signed data@Deprecated public static java.lang.Object doubleArrayToArray1D(double[] in, int inOffset, java.lang.Object out, int outOffset, int length)
in
- input arrayinOffset
- position where we start read data fromout
- output array which is used to receive result (and so define wanted type)outOffset
- position where we start to write data tolength
- number of value to convert (-1 means we will use the maximum possible length)@Deprecated public static java.lang.Object doubleArrayToArray1D(double[] in, java.lang.Object out)
in
- input arrayout
- output array which is used to receive result (and so define wanted type)@Deprecated public static java.lang.Object floatArrayToArray1D(float[] in, int inOffset, java.lang.Object out, int outOffset, int length)
in
- input arrayinOffset
- position where we start read data fromout
- output array which is used to receive result (and so define wanted type)outOffset
- position where we start to write data tolength
- number of value to convert (-1 means we will use the maximum possible length)@Deprecated public static java.lang.Object floatArrayToArray1D(float[] in, java.lang.Object out)
in
- input arrayout
- output array which is used to receive result (and so define wanted type)@Deprecated public static java.lang.Object intArrayToArray1D(int[] in, int inOffset, java.lang.Object out, int outOffset, int length, boolean signed)
in
- input arrayinOffset
- position where we start read data fromout
- output array which is used to receive result (and so define wanted type)outOffset
- position where we start to write data tolength
- number of value to convert (-1 means we will use the maximum possible length)signed
- assume input data as signed data@Deprecated public static java.lang.Object intArrayToArray1D(int[] in, java.lang.Object out, boolean signed)
in
- input arrayout
- output array which is used to receive result (and so define wanted type)signed
- assume input data as signed data@Deprecated public static java.lang.Object shortArrayToArray1D(short[] in, int inOffset, java.lang.Object out, int outOffset, int length, boolean signed)
in
- input arrayinOffset
- position where we start read data fromout
- output array which is used to receive result (and so define wanted type)outOffset
- position where we start to write data tolength
- number of value to convert (-1 means we will use the maximum possible length)signed
- assume input data as signed data@Deprecated public static java.lang.Object shortArrayToArray1D(short[] in, java.lang.Object out, boolean signed)
in
- input arrayout
- output array which is used to receive result (and so define wanted type)signed
- assume input data as signed data@Deprecated public static java.lang.Object byteArrayToArray1D(byte[] in, int inOffset, java.lang.Object out, int outOffset, int length, boolean signed)
in
- input arrayinOffset
- position where we start read data fromout
- output array which is used to receive result (and so define wanted type)outOffset
- position where we start to write data tolength
- number of value to convert (-1 means we will use the maximum possible length)signed
- assume input data as signed data@Deprecated public static java.lang.Object doubleArrayToArray2D(double[][] in, int inOffset, java.lang.Object out, int outOffset, int length)
in
- input arrayinOffset
- position where we start read data fromout
- output array which is used to receive result (and so define wanted type)outOffset
- position where we start to write data tolength
- number of value to convert (-1 means we will use the maximum possible length)@Deprecated public static java.lang.Object doubleArrayToArray2D(double[][] in, java.lang.Object out)
in
- input arrayout
- output array which is used to receive result (and so define wanted type)@Deprecated public static java.lang.Object floatArrayToArray2D(float[][] in, int inOffset, java.lang.Object out, int outOffset, int length)
in
- input arrayinOffset
- position where we start read data fromout
- output array which is used to receive result (and so define wanted type)outOffset
- position where we start to write data tolength
- number of value to convert (-1 means we will use the maximum possible length)@Deprecated public static java.lang.Object floatArrayToArray2D(float[][] in, java.lang.Object out)
in
- input arrayout
- output array which is used to receive result (and so define wanted type)@Deprecated public static java.lang.Object intArrayToArray2D(int[][] in, int inOffset, java.lang.Object out, int outOffset, int length, boolean signed)
in
- input arrayinOffset
- position where we start read data fromout
- output array which is used to receive result (and so define wanted type)outOffset
- position where we start to write data tolength
- number of value to convert (-1 means we will use the maximum possible length)signed
- assume input data as signed data@Deprecated public static java.lang.Object intArrayToArray2D(int[][] in, java.lang.Object out, boolean signed)
in
- input arrayout
- output array which is used to receive result (and so define wanted type)signed
- assume input data as signed data@Deprecated public static java.lang.Object shortArrayToArray2D(short[][] in, int inOffset, java.lang.Object out, int outOffset, int length, boolean signed)
in
- input arrayinOffset
- position where we start read data fromout
- output array which is used to receive result (and so define wanted type)outOffset
- position where we start to write data tolength
- number of value to convert (-1 means we will use the maximum possible length)signed
- assume input data as signed data@Deprecated public static java.lang.Object shortArrayToArray2D(short[][] in, java.lang.Object out, boolean signed)
in
- input arrayout
- output array which is used to receive result (and so define wanted type)signed
- assume input data as signed data@Deprecated public static java.lang.Object byteArrayToArray2D(byte[][] in, int inOffset, java.lang.Object out, int outOffset, int length, boolean signed)
in
- input arrayinOffset
- position where we start read data fromout
- output array which is used to receive result (and so define wanted type)outOffset
- position where we start to write data tolength
- number of value to convert (-1 means we will use the maximum possible length)signed
- assume input data as signed data@Deprecated public static java.lang.Object byteArrayToArray2D(byte[][] in, java.lang.Object out, boolean signed)
in
- input arrayout
- output array which is used to receive result (and so define wanted type)signed
- assume input data as signed data@Deprecated public static double[] arrayToDoubleArray1D(java.lang.Object in, int inOffset, double[] out, int outOffset, int length, boolean signed)
in
- input arrayinOffset
- position where we start read data fromout
- output array which is used to receive result (and so define wanted type)outOffset
- position where we start to write data tolength
- number of value to convert (-1 means we will use the maximum possible length)signed
- assume input data as signed data@Deprecated public static double[] arrayToDoubleArray1D(java.lang.Object in, double[] out, boolean signed)
in
- input arrayout
- output array which is used to receive result (and so define wanted type)signed
- assume input data as signed data@Deprecated public static double[] arrayToDoubleArray1D(java.lang.Object in, boolean signed)
in
- input arraysigned
- assume input data as signed data@Deprecated public static double[][] arrayToDoubleArray2D(java.lang.Object in, int inOffset, double[][] out, int outOffset, int length, boolean signed)
in
- input arrayinOffset
- position where we start read data fromout
- output array which is used to receive result (and so define wanted type)outOffset
- position where we start to write data tolength
- number of value to convert (-1 means we will use the maximum possible length)signed
- assume input data as signed data@Deprecated public static double[][] arrayToDoubleArray2D(java.lang.Object in, double[][] out, boolean signed)
in
- input arrayout
- output array which is used to receive result (and so define wanted type)signed
- assume input data as signed data@Deprecated public static double[][] arrayToDoubleArray2D(java.lang.Object in, boolean signed)
in
- input arraysigned
- assume input data as signed data@Deprecated public static float[] arrayToFloatArray1D(java.lang.Object in, int inOffset, float[] out, int outOffset, int length, boolean signed)
in
- input arrayinOffset
- position where we start read data fromout
- output array which is used to receive result (and so define wanted type)outOffset
- position where we start to write data tolength
- number of value to convert (-1 means we will use the maximum possible length)signed
- assume input data as signed data@Deprecated public static float[] arrayToFloatArray1D(java.lang.Object in, float[] out, boolean signed)
in
- input arrayout
- output array which is used to receive result (and so define wanted type)signed
- assume input data as signed data@Deprecated public static float[] arrayToFloatArray1D(java.lang.Object in, boolean signed)
in
- input arraysigned
- assume input data as signed data@Deprecated public static float[][] arrayToFloatArray2D(java.lang.Object in, int inOffset, float[][] out, int outOffset, int length, boolean signed)
in
- input arrayinOffset
- position where we start read data fromout
- output array which is used to receive result (and so define wanted type)outOffset
- position where we start to write data tolength
- number of value to convert (-1 means we will use the maximum possible length)signed
- assume input data as signed data@Deprecated public static float[][] arrayToFloatArray2D(java.lang.Object in, float[][] out, boolean signed)
in
- input arrayout
- output array which is used to receive result (and so define wanted type)signed
- assume input data as signed data@Deprecated public static float[][] arrayToFloatArray2D(java.lang.Object in, boolean signed)
in
- input arraysigned
- assume input data as signed data@Deprecated public static int[] arrayToIntArray1D(java.lang.Object in, int inOffset, int[] out, int outOffset, int length, boolean signed)
in
- input arrayinOffset
- position where we start read data fromout
- output array which is used to receive result (and so define wanted type)outOffset
- position where we start to write data tolength
- number of value to convert (-1 means we will use the maximum possible length)signed
- assume input data as signed data@Deprecated public static int[] arrayToIntArray1D(java.lang.Object in, int[] out, boolean signed)
in
- input arrayout
- output array which is used to receive result (and so define wanted type)signed
- assume input data as signed data@Deprecated public static int[] arrayToIntArray1D(java.lang.Object in, boolean signed)
in
- input arraysigned
- assume input data as signed data@Deprecated public static int[][] arrayToIntArray2D(java.lang.Object in, int inOffset, int[][] out, int outOffset, int length, boolean signed)
in
- input arrayinOffset
- position where we start read data fromout
- output array which is used to receive result (and so define wanted type)outOffset
- position where we start to write data tolength
- number of value to convert (-1 means we will use the maximum possible length)signed
- assume input data as signed data@Deprecated public static int[][] arrayToIntArray2D(java.lang.Object in, int[][] out, boolean signed)
in
- input arrayout
- output array which is used to receive result (and so define wanted type)signed
- assume input data as signed data@Deprecated public static int[][] arrayToIntArray2D(java.lang.Object in, boolean signed)
in
- input arraysigned
- assume input data as signed data@Deprecated public static short[] arrayToShortArray1D(java.lang.Object in, int inOffset, short[] out, int outOffset, int length, boolean signed)
in
- input arrayinOffset
- position where we start read data fromout
- output array which is used to receive result (and so define wanted type)outOffset
- position where we start to write data tolength
- number of value to convert (-1 means we will use the maximum possible length)signed
- assume input data as signed data@Deprecated public static short[] arrayToShortArray1D(java.lang.Object in, short[] out, boolean signed)
in
- input arrayout
- output array which is used to receive result (and so define wanted type)signed
- assume input data as signed data@Deprecated public static short[] arrayToShortArray1D(java.lang.Object in, boolean signed)
in
- input arraysigned
- assume input data as signed data@Deprecated public static short[][] arrayToShortArray2D(java.lang.Object in, int inOffset, short[][] out, int outOffset, int length, boolean signed)
in
- input arrayinOffset
- position where we start read data fromout
- output array which is used to receive result (and so define wanted type)outOffset
- position where we start to write data tolength
- number of value to convert (-1 means we will use the maximum possible length)signed
- assume input data as signed data@Deprecated public static short[][] arrayToShortArray2D(java.lang.Object in, short[][] out, boolean signed)
in
- input arrayout
- output array which is used to receive result (and so define wanted type)signed
- assume input data as signed data@Deprecated public static short[][] arrayToShortArray2D(java.lang.Object in, boolean signed)
in
- input arraysigned
- assume input data as signed data@Deprecated public static byte[] arrayToByteArray1D(java.lang.Object in, int inOffset, byte[] out, int outOffset, int length)
in
- input arrayinOffset
- position where we start read data fromout
- output array which is used to receive result (and so define wanted type)outOffset
- position where we start to write data tolength
- number of value to convert (-1 means we will use the maximum possible length)@Deprecated public static byte[] arrayToByteArray1D(java.lang.Object in, byte[] out)
in
- input arrayout
- output array which is used to receive result (and so define wanted type)@Deprecated public static byte[] arrayToByteArray1D(java.lang.Object in)
in
- input array@Deprecated public static byte[][] arrayToByteArray2D(java.lang.Object in, int inOffset, byte[][] out, int outOffset, int length)
in
- input arrayinOffset
- position where we start read data fromout
- output array which is used to receive result (and so define wanted type)outOffset
- position where we start to write data tolength
- number of value to convert (-1 means we will use the maximum possible length)@Deprecated public static byte[][] arrayToByteArray2D(java.lang.Object in, byte[][] out)
in
- input arrayout
- output array which is used to receive result (and so define wanted type)@Deprecated public static byte[][] arrayToByteArray2D(java.lang.Object in)
in
- input arraypublic static java.lang.Object arrayToDoubleArray(java.lang.Object array, boolean signed)
public static java.lang.Object arrayToFloatArray(java.lang.Object array, boolean signed)
public static java.lang.Object arrayToLongArray(java.lang.Object array, boolean signed)
public static java.lang.Object arrayToIntArray(java.lang.Object array, boolean signed)
public static java.lang.Object arrayToShortArray(java.lang.Object array, boolean signed)
public static java.lang.Object arrayToByteArray(java.lang.Object array)
public static java.lang.Object arrayToSafeArray(java.lang.Object in, int inOffset, java.lang.Object out, int outOffset, int length, boolean srcSigned, boolean dstSigned)
in
- input array we want to convertinOffset
- position where we start read data fromout
- output array which receive result and define the type in which we want to convert the
input arrayoutOffset
- position where we start to write data tolength
- number of value to convert (-1 means we will use the maximum possible length)srcSigned
- considers value from input array as signed (meaningful only for integer type array:
byte, short, int, long
)dstSigned
- considers output value as signed (meaningful only for integer type array:
byte, short, int, long
)@Deprecated public static java.lang.Object arrayToSafeArray(java.lang.Object in, int inOffset, java.lang.Object out, int outOffset, int length, boolean signed)
arrayToSafeArray(Object, int, Object, int, int, boolean, boolean)
instead.public static java.lang.Object arrayToSafeArray(java.lang.Object in, java.lang.Object out, boolean srcSigned, boolean dstSigned)
in
- input array we want to convertout
- output array which receive result and define the type in which we want to convert the
input arraysrcSigned
- considers value from input array as (un)signed (meaningful only for integer type
array: byte, short, int, long
)dstSigned
- considers output value as (un)signed (meaningful only for integer type array:
byte, short, int, long
)@Deprecated public static java.lang.Object arrayToSafeArray(java.lang.Object in, java.lang.Object out, boolean signed)
arrayToSafeArray(Object, Object, boolean, boolean)
instead.@Deprecated public static java.lang.Object doubleArrayToSafeArray1D(double[] in, int inOffset, java.lang.Object out, int outOffset, int length, boolean signed)
@Deprecated public static java.lang.Object doubleArrayToSafeArray1D(double[] in, java.lang.Object out, boolean signed)
@Deprecated public static java.lang.Object doubleArrayToSafeArray2D(double[][] in, int inOffset, java.lang.Object out, int outOffset, int length, boolean signed)
@Deprecated public static java.lang.Object doubleArrayToSafeArray2D(double[][] in, java.lang.Object out, boolean signed)
@Deprecated public static java.lang.Object floatArrayToSafeArray1D(float[] in, int inOffset, java.lang.Object out, int outOffset, int length, boolean signed)
@Deprecated public static java.lang.Object floatArrayToSafeArray1D(float[] in, java.lang.Object out, boolean signed)
@Deprecated public static java.lang.Object floatArrayToSafeArray2D(float[][] in, int inOffset, java.lang.Object out, int outOffset, int length, boolean signed)
@Deprecated public static java.lang.Object floatArrayToSafeArray2D(float[][] in, java.lang.Object out, boolean signed)
@Deprecated public static java.lang.Object intArrayToSafeArray1D(int[] in, int inOffset, java.lang.Object out, int outOffset, int length, boolean signed)
@Deprecated public static java.lang.Object intArrayToSafeArray1D(int[] in, java.lang.Object out, boolean signed)
@Deprecated public static java.lang.Object intArrayToSafeArray2D(int[][] in, int inOffset, java.lang.Object out, int outOffset, int length, boolean signed)
@Deprecated public static java.lang.Object intArrayToSafeArray2D(int[][] in, java.lang.Object out, boolean signed)
@Deprecated public static java.lang.Object shortArrayToSafeArray1D(short[] in, int inOffset, java.lang.Object out, int outOffset, int length, boolean signed)
@Deprecated public static java.lang.Object shortArrayToSafeArray1D(short[] in, java.lang.Object out, boolean signed)
@Deprecated public static java.lang.Object shortArrayToSafeArray2D(short[][] in, int inOffset, java.lang.Object out, int outOffset, int length, boolean signed)
@Deprecated public static java.lang.Object shortArrayToSafeArray2D(short[][] in, java.lang.Object out, boolean signed)
@Deprecated public static int[] arrayToSafeIntArray1D(java.lang.Object in, int inOffset, int[] out, int outOffset, int length, boolean signed)
@Deprecated public static int[] arrayToSafeIntArray1D(java.lang.Object in, int[] out, boolean signed)
@Deprecated public static int[][] arrayToSafeIntArray2D(java.lang.Object in, int inOffset, int[][] out, int outOffset, int length, boolean signed)
@Deprecated public static int[][] arrayToSafeIntArray2D(java.lang.Object in, int[][] out, boolean signed)
@Deprecated public static short[] arrayToSafeShortArray1D(java.lang.Object in, int inOffset, short[] out, int outOffset, int length, boolean signed)
@Deprecated public static short[] arrayToSafeShortArray1D(java.lang.Object in, short[] out, boolean signed)
@Deprecated public static short[][] arrayToSafeShortArray2D(java.lang.Object in, int inOffset, short[][] out, int outOffset, int length, boolean signed)
@Deprecated public static short[][] arrayToSafeShortArray2D(java.lang.Object in, short[][] out, boolean signed)
@Deprecated public static byte[] arrayToSafeByteArray1D(java.lang.Object in, int inOffset, byte[] out, int outOffset, int length, boolean signed)
@Deprecated public static byte[] arrayToSafeByteArray1D(java.lang.Object in, byte[] out, boolean signed)
@Deprecated public static byte[][] arrayToSafeByteArray2D(java.lang.Object in, int inOffset, byte[][] out, int outOffset, int length, boolean signed)
@Deprecated public static byte[][] arrayToSafeByteArray2D(java.lang.Object in, byte[][] out, boolean signed)
public static java.lang.Object arrayToSafeLongArray(java.lang.Object array, boolean signed)
public static java.lang.Object arrayToSafeIntArray(java.lang.Object array, boolean signed)
public static java.lang.Object arrayToSafeShortArray(java.lang.Object array, boolean signed)
public static java.lang.Object arrayToSafeByteArray(java.lang.Object array, boolean signed)
public static java.lang.String arrayToString(java.lang.Object array)
array
- 1D array containing values to return as stringpublic static java.lang.String array1DToString(java.lang.Object array, boolean signed, boolean hexa, java.lang.String separator, int size)
array
- 1D array containing values to return as stringsigned
- input value are signed (only for integer data type)hexa
- set value in resulting string in hexa decimal format (only for integer data type)separator
- specify the separator to use between each array value in resulting stringsize
- specify the number of significant number to display for float value (-1 means all)public static java.lang.Object stringToArray1D(java.lang.String value, DataType dataType)
value
- string containing value to return as 1D arraydataType
- specify the values data type and also the output array data type string@Deprecated public static java.lang.Object stringToArray1D(java.lang.String value, int dataType)
stringToArray1D(String, DataType)
insteadpublic static java.lang.Object stringToArray1D(java.lang.String value, DataType dataType, boolean hexa, java.lang.String separator)
value
- string containing value to return as 1D arraydataType
- specify the values data type and also the output array data type stringhexa
- values in string as stored as hexa values (only for integer data type)separator
- specify the separator used between each value in the input string@Deprecated public static java.lang.Object stringToArray1D(java.lang.String value, int dataType, boolean hexa, java.lang.String separator)
stringToArray1D(String, DataType, boolean , String )
insteadpublic static int[] createLinearIntArray(int size, int initialValue, int step)
size
- the size of the array to createinitialValue
- the initial value (i.e. the first element of the array, boolean signed)step
- the step between consecutive array valuespublic static double[] createLinearDoubleArray(int size, double initialValue, double step)
size
- the size of the array to createinitialValue
- the initial value (i.e. the first element of the array)step
- the step between consecutive array values@Deprecated public static byte[] toByteArray1D(boolean[] array)
Array1DUtil.toByteArray(boolean[])
instead@Deprecated public static byte[] toByteArray1D(boolean[] in, byte[] out, int offset)
Array1DUtil.toByteArray(boolean[], byte[], int)
instead@Deprecated public static boolean[] toBooleanArray1D(byte[] array)
Array1DUtil.toBooleanArray(byte[])
instead@Deprecated public static boolean[] toBooleanArray1D(byte[] in, boolean[] out, int offset)
Array1DUtil.toBooleanArray(byte[], boolean[], int)
instead