List of utility methods to do Array Length Get
void | arrayBounds(int arrayLength, int offset, int length) array Bounds if (offset < 0 || length < 0 || length > arrayLength - offset) { throw new IndexOutOfBoundsException( "array.length=" + arrayLength + ", offset=" + offset + ", length=" + length); |
int | arrayCounter(T[] x) array Counter int z = 0; for (int i = 0; i < x.length; i++) { T y = x[i]; if (y != null) { z++; return z; ... |
int | arrayLenght(Object array) array Lenght if (array instanceof Object[]) { return ((Object[]) array).length; } else if (array instanceof int[]) { return ((int[]) array).length; } else if (array instanceof long[]) { return ((long[]) array).length; } else if (array instanceof double[]) { return ((double[]) array).length; ... |
int | arrayLength(Object array, int defaultIfNull, int defaultIfNotArray) array Length if (array == null) { return defaultIfNull; } else if (array instanceof Object[]) { return ((Object[]) array).length; } else if (array instanceof long[]) { return ((long[]) array).length; } else if (array instanceof int[]) { return ((int[]) array).length; ... |
int | arrayLength(Object o) array Length if (o instanceof Object[]) return ((Object[]) o).length; else if (o instanceof boolean[]) return ((boolean[]) o).length; else if (o instanceof float[]) return ((float[]) o).length; else if (o instanceof double[]) return ((double[]) o).length; ... |
int | arrayLength(Object[] ar) array Length return ar.length;
|
int | length(byte[] array) length return (array == null ? 0 : array.length);
|
String | length(byte[] array) length return "(" + array.length + " B)"; |
double | length(double[] a) length double c = 0; for (int i = 0; i < a.length; i++) c += a[i] * a[i]; return Math.sqrt(c); |
double | length(double[] point) length return Math.sqrt(stScalarProd(point, point));
|