Double Class
Contains methods for the Double primitive data type.
For more information on Double, see Double Data Type.
The following are methods for Double.
-
Returns the String value for this Double using the locale of the context user
-
Returns the Integer value of this Double by casting it to an Integer.
-
Returns the Long value of this Double.
-
Returns the closest Long to this Double value.
-
Returns a Double that contains the value of the specified String. As in Java, the String is interpreted as representing a signed decimal.
-
Converts the specified object to a Double value. Use this method to convert a history tracking field value or an object that represents a Double value.
Returns the String value for this Double using the locale of the context user
public String format()
Type: String
Returns the Integer value of this Double by casting it to an Integer.
public Integer intValue()
Type: Integer
Returns the Long value of this Double.
public Long longValue()
Type: Long
Returns the closest Long to this Double value.
public Long round()
Type: Long
Returns a Double that contains the value of the specified String. As in Java, the String is interpreted as representing a signed decimal.
public static Double valueOf(String stringToDouble)
-
stringToDouble:
Type: String
Type: Double
Converts the specified object to a Double value. Use this method to convert a history tracking field value or an object that represents a Double value.
public static Double valueOf(Object fieldValue)
-
fieldValue:
Type: Object
Type: Double
Use this method with the OldValue or NewValue fields of history sObjects, such as AccountHistory, when the field type corresponds to a Double type, like a number field.