com.marklogic.xcc.types

## Interface XSDouble

- All Superinterfaces:
    XdmAtomic, XdmItem, XdmValue

      public interface XSDouble
      extends XdmAtomic

  XDM type: xs:double.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.math.BigDecimal` | `asBigDecimal()` The item's value as a `BigDecimal`.
    `java.lang.Double` | `asDouble()` The item's value as a `Double`.
    `double` | `asPrimitiveDouble()` The item's value as a primitive double value.

    - ### Methods inherited from interface com.marklogic.xcc.types.XdmItem

      `asInputStream, asReader, getItemType, isCached, writeTo, writeTo`

    - ### Methods inherited from interface com.marklogic.xcc.types.XdmValue

      `asString, getValueType`

- - ### Method Detail

    - #### asDouble

          java.lang.Double asDouble()

      The item's value as a `Double`. Some precision may be lost by casting to the Java type.
      Returns:
        The value of this item as a Java Double object.
      See Also:
        `asBigDecimal()`

    - #### asPrimitiveDouble

          double asPrimitiveDouble()

      The item's value as a primitive double value. Some precision may be lost by casting to the Java type.
      Returns:
        The value of this item as a primitive Java double.
      See Also:
        `asBigDecimal()`

    - #### asBigDecimal

          java.math.BigDecimal asBigDecimal()

      The item's value as a `BigDecimal`. This value may preserve more precision than `asDouble()` or `asPrimitiveDouble()`.
      Returns:
        The value of this item as a Java BigDecimal object.

Copyright © 2025 MarkLogic Corporation

Complete online documentation for MarkLogic Server, XQuery and related components may be found at docs.progress.com