com.ihr.xbrl.om.instance

## Class XBRLFactNumeric

- java.lang.Object
- - com.ihr.xbrl.om.XMLFragment
  - - com.ihr.xbrl.om.instance.XBRLFact
    - - com.ihr.xbrl.om.instance.XBRLFactItem
      - - com.ihr.xbrl.om.instance.XBRLFactNumeric

- All Implemented Interfaces:
    HasAdditionalEqualityForReassignation, ObtainHistoryInterface, StoreHistoryInterface, XBRLRelationshipPoint, Thinable, XBRLValidation, XMLHasParent, java.lang.Cloneable, javax.xml.namespace.NamespaceContext

      public class XBRLFactNumeric
      extends XBRLFactItem
      implements HasAdditionalEqualityForReassignation

  The Class XBRLFactNumeric.
  Author:
    Ignacio

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.ihr.xbrl.om.XBRLValidation

      `XBRLValidation.Direction`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static javax.xml.namespace.QName` | `decimals` The Constant decimals.
    `static javax.xml.namespace.QName` | `denominator` The Constant denominator.
    `static javax.xml.namespace.QName` | `numerator` The Constant numerator.
    `static javax.xml.namespace.QName` | `precision` The Constant precision.
    `static javax.xml.namespace.QName` | `unitRef` The Constant unitRef.

    - ### Fields inherited from class com.ihr.xbrl.om.instance.XBRLFactItem

      `contextRef`

    - ### Fields inherited from class com.ihr.xbrl.om.instance.XBRLFact

      `nil`

    - ### Fields inherited from class com.ihr.xbrl.om.XMLFragment

      `CONCEPT_LABEL, CONCEPT_QNAME, EASY_TO_READ, ELEMENT_LABEL, EMPTYRELATIONSHIPSITERATORINSTANCE, EMPTYXMLFRAGMENTITERATORINSTANCE, FACT_CONCEPT_DATATYPE, FACT_CONCEPT_LABEL, FACT_QNAME, HIDE_COMMON_ACCURACY, idQName, NO_POSITION, OrderComparator, OrderComparator2, PERIOD_TYPE, PERIOD_VALUE, SHORT_TEXT, SOURCE_DOCUMENT, XPATH, XPOINTER`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XBRLFactNumeric(XBRLFactsList container, XBRLContext context, XBRLItem item, XBRLUnit unit)` Creates a numeric fact item providing all required information and NIL value.
    `XBRLFactNumeric(XBRLFactsList container, XBRLContext context, XBRLItem item, XBRLUnit unit, XBRLNumber value)` Creates a numeric fact item providing all required information.
    `XBRLFactNumeric(XBRLFactsList container, net.sf.saxon.s9api.XdmNode root, XBRLItem item, int pos)` Instantiates a new XBRL fact numeric.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()` Eliminates all this fact content.
    `XBRLFactNumeric` | `clone()`
    `XBRLFactNumeric` | `clone(DTSContainer newDTS)` Clone current fact but in a new DTSContainer.
    `boolean` | `equals(java.lang.Object obj)` Sets a new XPathFunctionResolver for this object.
    `org.jdom.Element` | `generateNode(boolean relativize, java.net.URI base)` Generates the XBRLFactItem jdom node.
    `java.util.Iterator<XBRLAttribute>` | `getAttributes()` Removes the unitRef,decimals and precision attributes from the XBRLFactNumeric Parent iterators already removes the id attribute and the contextRef attributes.
    `int` | `getFormat()` Returns the representation format of this element XBRLNumber.DECIMALS or #XBRLNumber.PRECISION
    `java.lang.String` | `getFriendlyName()` Returns a string description that represents the element content in a form that users can understand.
    `java.lang.String` | `getFriendlyName(int modifiers, LabelsProvider lp)` Gets the friendly name.
    `XBRLNumber` | `getNumericValue()` Return the double representation of the value after dealing with @precision and @decimals This class returns either a XBRLNumericValue or an XBRLFractionValue depending on the surrounding value is a fraction or a number.
    `XBRLUnit` | `getUnit()` Obtains the unit of this fact.
    `net.sf.saxon.s9api.XdmValue` | `getValue()` Returns the value of this node.
    `int` | `hashCode()`
    `boolean` | `isDuplicate(XBRLFact otherFact)` Check if two items are duplicates as defined in the XBRL 2.1 specification
    `boolean` | `isDuplicate(XBRLFactItem otherFact, boolean reversePEqual)` For internal purposes only during the calculation of isDuplicate of tuple children elements.
    `boolean` | `isFraction()` Checks if is fraction.
    `boolean` | `resolve_equal2(net.sf.saxon.s9api.XdmNode otherXdmNode)` resolves content that is added by this XMLFragment during XMLNode serialization and may not be available to the lower levels in the hierarchy.
    `void` | `setFormat(int format)` Sets the representation of this number to DECIMALS or PRECISION.
    `void` | `setUnit(XBRLUnit unit)` Sets a new unit for this fact.
    `void` | `setValue(net.sf.saxon.value.AtomicValue value)` Sets the value.
    `XBRLNumber` | `setValue(XBRLNumber newVal)` Sets the value of this numeric fact to a new value.
    `void` | `setValue(net.sf.saxon.s9api.XdmValue value)` Sets the value of this node.
    `boolean` | `uEqual(XBRLFactItem factTotal)` Evaluates it the two instantiation of the items are u-equal.
    `boolean` | `vEqual(XBRLFactItem toFact)` Check if two items are value equal as defined in the XBRL 2.1 specification

    - ### Methods inherited from class com.ihr.xbrl.om.instance.XBRLFactItem

      `cEqual, createItemInstance, createItemInstance, createItemInstance, getContext, getDocumentURI, getElementDefinition, getStringValue, isBlank, isDescendantOrSibling, s_equal2, setBlank, setContext`

    - ### Methods inherited from class com.ihr.xbrl.om.instance.XBRLFact

      `addEvent, addEvent, addEvent, createItemOrTupleInstance, createItemOrTupleInstance, generateLocatorToNode, getElements, getHistory, getHistoryAsString, getInstance, getParent, getTaxonomy, getValidationReport, getXPathToRoot, invalidate, invalidate, isNil, isOnValidation, pEqual, setId, setNil, setParent, validate`

    - ### Methods inherited from class com.ihr.xbrl.om.XMLFragment

      `addAttribute, addChild, addFromRelationship, addNamespace, addNamespace, addToRelationship, addXMLChild, changeBase, checkBase, delAttribute, delAttribute, equalXdmValues, evaluateBoolean, evaluateList, evaluateNode, evaluateNumber, evaluateString, generateId, generateNodeNamespacesAndAttributes, generateNodeValue, generatePrefix, getAllAttributes, getAttribute, getAttributeBooleanValue, getAttributeQNameValue, getAttributes, getAttributeStringValue, getAttributeValue, getBase, getBase, getBaseURI, getBooleanValue, getChild, getContainer, getContainerDocumentURI, getDeclaredNamespaces, getDocument, getElementsHashCode, getFragment, getFromRelationships, getFromRelationships, getFromRelationships, getFromRelationships, getFromRelationships, getGenericLabelText, getId, getLang, getNamespaceURI, getNodeName, getNumberOfAttributes, getNumberOfElements, getNumberOfFromRelationships, getNumberOfToRelationships, getOrGenerateId, getPrefix, getPrefixes, getQNameValue, getRelationshipsBases, getRelationshipsChain, getRelationshipTypes, getStaticContext, getStaticNamespace, getToolTipText, getToRelationships, getToRelationships, getToRelationships, getToRelationships, getToRelationships, getXPathExecutable, getXPathNamespaceContext, getXPathToNode, getXPointerElementScheme, getXPointerElementScheme, getXPointerShorthandScheme, getXPointerToNode, isDead, isNamespaceDefined, isXdmDocumentAttached, objEquals, objHashCode, qNameToString, removeAttribute, removeChild, removeChild, removeFromRelationship, removeToRelationship, removeXMLChild, resetElements, resetHash, resolveHRef, resolveHRef, s_equal2, s_equal2, setAttributes, setBase, setDocument, setDocumentAndReload, setElements, setLang, setNamespaceContext, setNamespaces, setNode, setNodeName, setParent, setRegenerateNodeIfnotFound, setVariablesDefined, size, thin, toString, valueEquals, xEqual`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### unitRef

          public static final javax.xml.namespace.QName unitRef

      The Constant unitRef.

    - #### decimals

          public static final javax.xml.namespace.QName decimals

      The Constant decimals.

    - #### precision

          public static final javax.xml.namespace.QName precision

      The Constant precision.

    - #### numerator

          public static final javax.xml.namespace.QName numerator

      The Constant numerator.

    - #### denominator

          public static final javax.xml.namespace.QName denominator

      The Constant denominator.

  - ### Constructor Detail

    - #### XBRLFactNumeric

          public XBRLFactNumeric(XBRLFactsList container,
                         XBRLContext context,
                         XBRLItem item,
                         XBRLUnit unit,
                         XBRLNumber value)

      Creates a numeric fact item providing all required information.
      Parameters:
        `container` - the container
        `context` - the context
        `item` - the item
        `unit` - the unit
        `value` - the value

    - #### XBRLFactNumeric

          public XBRLFactNumeric(XBRLFactsList container,
                         XBRLContext context,
                         XBRLItem item,
                         XBRLUnit unit)

      Creates a numeric fact item providing all required information and NIL value.
      Parameters:
        `container` - the container
        `context` - the context
        `item` - the item
        `unit` - the unit

    - #### XBRLFactNumeric

          public XBRLFactNumeric(XBRLFactsList container,
                         net.sf.saxon.s9api.XdmNode root,
                         XBRLItem item,
                         int pos)
                          throws XBRLValidationException

      Instantiates a new XBRL fact numeric.
      Parameters:
        `container` - the container
        `root` - the root
        `item` - the item
        `pos` - the pos
      Throws:
        `XBRLValidationException` - if the item is not numeric

  - ### Method Detail

    - #### clone

          public XBRLFactNumeric clone()

      Overrides:
        `clone` in class `XBRLFactItem`

    - #### clone

          public XBRLFactNumeric clone(DTSContainer newDTS)

      Description copied from class: `XBRLFact`
      Clone current fact but in a new DTSContainer.
      Overrides:
        `clone` in class `XBRLFactItem`
      Parameters:
        `newDTS` - the new dts
      Returns:
        cloned XBRLFact

    - #### clear

          public void clear()
                     throws java.lang.Throwable

      Eliminates all this fact content.
      Overrides:
        `clear` in class `XBRLFactItem`
      Throws:
        `java.lang.Throwable` - the throwable

    - #### setUnit

          public void setUnit(XBRLUnit unit)

      Sets a new unit for this fact.
      Parameters:
        `unit` - the new unit

    - #### getUnit

          public XBRLUnit getUnit()

      Obtains the unit of this fact.
      Returns:
        XBRLUnit

    - #### getAttributes

          public java.util.Iterator<XBRLAttribute> getAttributes()

      Removes the unitRef,decimals and precision attributes from the XBRLFactNumeric

      Parent iterators already removes the id attribute and the contextRef attributes.

      Overrides:
        `getAttributes` in class `XBRLFactItem`
      Returns:
        the attributes
      Since:
        2.6.4
      See Also:
        `XMLFragment.getAttributes()`

    - #### setValue

          public XBRLNumber setValue(XBRLNumber newVal)

      Sets the value of this numeric fact to a new value.
      Parameters:
        `newVal` - the new val
      Returns:
        XBRLNumericValue the old value or null

    - #### setValue

          public void setValue(net.sf.saxon.value.AtomicValue value)

      Description copied from class: `XMLFragment`
      Sets the value.
      Overrides:
        `setValue` in class `XBRLFactItem`
      Parameters:
        `value` - the new value

    - #### setValue

          public void setValue(net.sf.saxon.s9api.XdmValue value)

      Description copied from class: `XMLFragment`
      Sets the value of this node.
      Overrides:
        `setValue` in class `XBRLFactItem`
      Parameters:
        `value` - the new value

    - #### getValue

          public net.sf.saxon.s9api.XdmValue getValue()

      Description copied from class: `XMLFragment`
      Returns the value of this node. If the value has been set to a jdom node then this function returns null If getDocument() is null then this function returns an empty sequence If getDocument() is not null this function tries to return an atomic value this function should be overridden by objects in this API
      Overrides:
        `getValue` in class `XMLFragment`
      Returns:
        a net.sf.saxon.s9api.XdmValue

    - #### getNumericValue

          public XBRLNumber getNumericValue()

      Return the double representation of the value after dealing with @precision and @decimals

      This class returns either a XBRLNumericValue or an XBRLFractionValue depending on the surrounding value is a fraction or a number.

      Returns:
        XBRLNumericValue or XBRLFractionValue

    - #### uEqual

          public boolean uEqual(XBRLFactItem factTotal)

      Evaluates it the two instantiation of the items are u-equal.
      Specified by:
        `uEqual` in class `XBRLFactItem`
      Parameters:
        `factTotal` - the fact total
      Returns:
        boolean

    - #### vEqual

          public boolean vEqual(XBRLFactItem toFact)

      Description copied from class: `XBRLFactItem`
      Check if two items are value equal as defined in the XBRL 2.1 specification
      Specified by:
        `vEqual` in class `XBRLFactItem`
      Parameters:
        `toFact` - the other XBRLFactItem
      Returns:
        boolean

    - #### isDuplicate

          public boolean isDuplicate(XBRLFact otherFact)

      Description copied from class: `XBRLFact`
      Check if two items are duplicates as defined in the XBRL 2.1 specification
      Specified by:
        `isDuplicate` in class `XBRLFact`
      Parameters:
        `otherFact` - the other XBRLFactItem
      Returns:
        boolean

    - #### isDuplicate

          public boolean isDuplicate(XBRLFactItem otherFact,
                            boolean reversePEqual)

      Description copied from class: `XBRLFactItem`
      For internal purposes only during the calculation of isDuplicate of tuple children elements.
      Specified by:
        `isDuplicate` in class `XBRLFactItem`
      Parameters:
        `otherFact` - the t target
        `reversePEqual` - the reverse p equal
      Returns:
        boolean value

    - #### generateNode

          public org.jdom.Element generateNode(boolean relativize,
                                      java.net.URI base)
                                        throws XBRLSerializationException

      Description copied from class: `XBRLFactItem`
      Generates the XBRLFactItem jdom node. If neccesary, generates the footnotes defined for this node.
      Overrides:
        `generateNode` in class `XBRLFactItem`
      Parameters:
        `relativize` - the relativize
        `base` - the base
      Returns:
        the element
      Throws:
        `XBRLSerializationException` - the XBRL serialization exception

    - #### isFraction

          public boolean isFraction()

      Checks if is fraction.
      Returns:
        true, if is fraction

    - #### getFormat

          public int getFormat()

      Returns the representation format of this element XBRLNumber.DECIMALS or #XBRLNumber.PRECISION
      Returns:
        int

    - #### setFormat

          public void setFormat(int format)

      Sets the representation of this number to DECIMALS or PRECISION.
      Parameters:
        `format` - the new format

    - #### getFriendlyName

          public java.lang.String getFriendlyName()

      Description copied from class: `XMLFragment`
      Returns a string description that represents the element content in a form that users can understand. This method may be overridden by parent classes.

      Remarks, this method may return very long names not suitable for user interface

      Overrides:
        `getFriendlyName` in class `XBRLFact`
      Returns:
        Non empty String. Internationalization is enabled

    - #### getFriendlyName

          public java.lang.String getFriendlyName(int modifiers,
                                         LabelsProvider lp)

      Description copied from class: `XBRLFact`
      Gets the friendly name.
      Overrides:
        `getFriendlyName` in class `XBRLFact`
      Parameters:
        `modifiers` - the modifiers
        `lp` - the lp
      Returns:
        a String representation of this fact.

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `XBRLFactItem`

    - #### equals

          public boolean equals(java.lang.Object obj)

      Description copied from class: `XMLFragment`
      Sets a new XPathFunctionResolver for this object.
      Overrides:
        `equals` in class `XBRLFactItem`
      Parameters:
        `obj` - the other
      Returns:
        true, if successful

    - #### resolve_equal2

          public boolean resolve_equal2(net.sf.saxon.s9api.XdmNode otherXdmNode)

      Description copied from interface: `HasAdditionalEqualityForReassignation`
      resolves content that is added by this XMLFragment during XMLNode serialization and may not be available to the lower levels in the hierarchy.
      Specified by:
        `resolve_equal2` in interface `HasAdditionalEqualityForReassignation`
      Overrides:
        `resolve_equal2` in class `XBRLFactItem`
      Parameters:
        `otherXdmNode` - the other xdm node
      Returns:
        true, if successful