List of utility methods to do Array Length Get
int | lengthNeeded(byte[] b) length Needed if (b[0] != 0) { return 8; if (b[1] != 0) { return 7; if (b[2] != 0) { return 6; ... |
int | lengthOf(T[] array) length Of return array == null ? 0 : array.length;
|
int | lengthOfShortestIn(String[] strings) Return the length of the shortest string in the array. int minLength = Integer.MAX_VALUE; for (int i = 0; i < strings.length; i++) { if (strings[i] == null) return 0; minLength = Math.min(minLength, strings[i].length()); return minLength; |
double | lengthSQ(double[] vector) length SQ double max = 0.0; for (double aValue : vector) { max += aValue * aValue; return max; |
int | lengthToWrite(final byte[] data, final int offset, final int dataLength, final boolean rightTrim) lengthToWrite. int lengthToWrite = 0; if (!rightTrim) lengthToWrite = dataLength; else for (int i = offset + dataLength - 1; i >= offset; i--) if (data[i] != ' ') { lengthToWrite = (i - offset) + 1; break; ... |
int | lengthToZero(byte[] data, int offset) length To Zero int start = offset; for (int i = start; i < data.length; i++) { if (data[i] == 0) { return (i - start); int remaining = data.length - start; return remaining > 0 ? remaining : 0; ... |
double | LengthVec3D(double[] vec) Length Vec D return Math.sqrt(vec[0] * vec[0] + vec[1] * vec[1] + vec[2] * vec[2]);
|