List of utility methods to do Double Convert to
double | convertDouble(Object param) convert Double return new Double(param.toString()); |
Double | convertDouble(String str) convert Double double val = 0; try { val = Double.parseDouble(str); } catch (NumberFormatException ex) { return new Double(val); |
double | convertDouble(String str, double defaults) convert Double if (str == null) { return defaults; try { return Double.parseDouble(str); } catch (Exception e) { return defaults; |
double[] | convertDouble2double(final Double[] pArray) convert Doubledouble final double[] lNewArray = new double[pArray.length]; for (int i = 0; i < pArray.length; i++) { lNewArray[i] = pArray[i].doubleValue(); return lNewArray; |
String | convertDoubleArrayToString(double[] value, String separator) convert Double Array To String if (value.length == 0) { return ""; StringBuilder sb = new StringBuilder(); for (double v : value) { sb.append(v); sb.append(separator); sb.setLength(sb.length() - separator.length()); return sb.toString(); |
void | convertDoubleConsonant(byte[] b) convert Double Consonant int len = b.length; if ((len & 1) == 1) { b[len - 1] = '\0'; len--; for (int i = 0; i < len; i += 2) { int high = b[i] & 0xff; int low = b[i + 1] & 0xff; ... |
double | convertDoubleFromBytes(final byte[] bytes) convert Double From Bytes return convertDoubleFromBytes(bytes, 0);
|
String | convertDoubleIntoHexadecimalString(double value, int precision) convert Double Into Hexadecimal String double fractionValue = value % 1; int intValue = (int) (value - fractionValue); String str = Integer.toHexString(intValue); if (fractionValue != 0) { str += "."; StringBuilder dec = new StringBuilder(); while ((fractionValue *= 16) != 0 && dec.length() < precision) { double temp = fractionValue % 1; ... |
double[] | convertDoubleList(Double[] list) convert Double List if (list == null) return null; double[] result = new double[list.length]; for (int i = 0; i < list.length; i++) result[i] = list[i].doubleValue(); return result; |
float[][] | convertDoubleMatrixToFloat(double[][] input, int dimRows, int dimColoumns) convert Double Matrix To Float if (input == null) { return null; float[][] output = new float[dimRows][dimColoumns]; for (int i = 0; i < dimRows; i++) { for (int j = 0; j < dimColoumns; j++) { output[i][j] = (float) input[i][j]; return output; |