public static Double toDouble(Number self){
  if ((self instanceof Double) || (self instanceof Long) || (self instanceof Integer)|| (self instanceof Short)|| (self instanceof Byte)) {
    return self.doubleValue();
  }
  return Double.valueOf(self.toString());
}

public static Double toDouble ( Number self ) { if ( ( self instanceof Double ) || ( self instanceof Long ) || ( self instanceof Integer ) || ( self instanceof Short ) || ( self instanceof Byte ) ) { return self . doubleValue ( ) ; } return Double . valueOf ( self . toString ( ) ) ; }
transform a number into a double
