DoubleValue
open class DoubleValue : DataValue, @unchecked Sendable
DataValue subclass that wraps a value of type double.
-
Wrapped zero value.
Declaration
Swift
public static let zero: DoubleValue -
Compare two wrapped values for ordering.
Declaration
Swift
open class func compare(_ left: DoubleValue, _ right: DoubleValue) -> IntParameters
leftFirst object for comparison.
rightSecond object for comparison.
Return Value
-1 if
left.value < right.value, 0 ifleft.value == right.value, or 1 ifleft.value > right.value. -
Declaration
Swift
override open func copyMutable() -> DataValueReturn Value
A clone of this value if it (together with all value subcomponents) is possibly mutable, or return
selfvalue if it (together with all value subcomponents) is definitely immutable. The resulting value might share mutable metadata with this query. -
The type BasicType.DOUBLE.
Declaration
Swift
override open var dataType: DataType { get } -
Compare two wrapped values for equality.
Declaration
Swift
open class func equal(_ left: DoubleValue?, _ right: DoubleValue?) -> BoolParameters
leftFirst object for comparison.
rightSecond object for comparison.
Return Value
trueifleft.value == right.valueor if both arguments arenil, otherwisefalse. -
Declaration
Swift
override open func equals(_ other: AnyObject?) -> BoolParameters
otherThe value to compare with.
Return Value
trueif this object is equal tovalue. -
Hash the wrapped value to a number.
Declaration
Swift
override open func hashCode() -> IntReturn Value
Any value in the range of type
int. -
Wrap a
doublevalue as an object.Declaration
Swift
open class func of(_ value: Double) -> DoubleValueParameters
valueValue to be wrapped.
Return Value
The wrapped value.
-
Wrap a
doublevalue as an object.Declaration
Swift
open class func of(_ value: String) -> DoubleValue?Parameters
valueValue to be wrapped (in string form, which will be returned if
toStringis called).Return Value
The wrapped value, or null if the string form is not a valid number.
-
Wrap a nullable
doublevalue as an object.Declaration
Swift
open class func of(optional value: Double?) -> DoubleValue?Parameters
valueValue to be wrapped.
Return Value
The wrapped value.
-
Convert a wrapped
doublevalue to a nullable double.Declaration
Swift
open class func optional(_ value: AnyObject?) -> Double?Parameters
valueThe wrapped value.
Return Value
A nullable double.
-
Convert this data value to a string. If the
dataTypeis defined by XML Schema Part 2: Datatypes, then the corresponding lexical format is used. JSON format is used for structured values (arrays and objects).Declaration
Swift
override open func toString() -> StringReturn Value
Lexical representation of this data value.
-
Declaration
Swift
open func toString3() -> StringReturn Value
“NaN”, “INF”, “-INF”, or
this.toString()for regular numbers. -
Data type code of the wrapped value, equivalent to
dataType.code.Declaration
Swift
override open var typeCode: Int { get } -
Convert a wrapped
doublevalue to a double.Declaration
Swift
open class func unwrap(_ value: AnyObject?) -> DoubleParameters
valueThe wrapped value.
Return Value
A double.
-
The wrapped value.
Declaration
Swift
@inline(__always) public final var value: Double { get }