Java Utililty Methods Double Number Create

List of utility methods to do Double Number Create

Description

The list of methods to do Double Number Create are organized into topic(s).

Method

doubletoDouble(Object obj)
to Double
double value = 0;
if (obj == null)
    return value;
else {
    Double dblObj = (Double) obj;
    value = dblObj.doubleValue();
    return value;
doubletoDouble(Object obj)
to Double
return Double.parseDouble(toString(obj).trim());
DoubletoDouble(Object obj)
to Double
if (obj instanceof String)
    return Double.valueOf((String) obj);
if (obj instanceof Byte) {
    Byte b = (Byte) obj;
    return b.doubleValue();
if (obj instanceof Short) {
    Short s = (Short) obj;
...
doubletoDouble(Object obj)
to Double
return toDouble(obj, 0d);
doubletoDouble(Object obj)
Converts an Object to a double.
Double result = toDoubleObject(obj);
return result == null ? 0.0 : result.doubleValue();
DoubletoDouble(Object object)
to Double
return object instanceof Number ? ((Number) object).doubleValue() : Double.parseDouble(object.toString());
doubletoDouble(Object object, double defaultValue)
Extract the value represented by the given object (Number or String).
if (object == null) {
    return defaultValue;
if (object instanceof Number) {
    return ((Number) object).doubleValue();
try {
    Double value = Double.valueOf(object.toString().trim());
...
DoubletoDouble(Object object, Double defaultValue)
to Double
if (object == null) {
    return defaultValue;
if (object instanceof Number) {
    return ((Number) object).doubleValue();
try {
    Double value = Double.valueOf(object.toString().trim());
...
doubletoDouble(Object objValue)
to Double
if (objValue != null) {
    if (objValue instanceof Number) {
        return ((Number) objValue).doubleValue();
    } else {
        return Double.parseDouble(objValue.toString());
} else
    return 0;
...
doubletoDouble(Object prmIntObject)
to Double
double rtnDouble = 0;
if (prmIntObject != null) {
    if (prmIntObject.toString() != "") {
        rtnDouble = Double.parseDouble(prmIntObject.toString());
return rtnDouble;