com.ihr.xbrl.om.formula

## Class MultiFormulaParameterResolver

- java.lang.Object
- - java.util.AbstractCollection<E>
  - - java.util.AbstractList<E>
    - - java.util.Vector<XBRLFormulaParametersResolver>
      - - com.ihr.xbrl.om.formula.MultiFormulaParameterResolver

- All Implemented Interfaces:
    XBRLFormulaParametersResolver, java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<XBRLFormulaParametersResolver>, java.util.Collection<XBRLFormulaParametersResolver>, java.util.List<XBRLFormulaParametersResolver>, java.util.RandomAccess

      public class MultiFormulaParameterResolver
      extends java.util.Vector<XBRLFormulaParametersResolver>
      implements XBRLFormulaParametersResolver

  Establish a chain of parameter resolvers all stored in a vector of formula parameter resolvers.

  When a parameter value is needed, all parameter resolvers are asked for a value in the order indicated in the vector. If able to supply the value exist, then it is used. If none are found then null is returned as indicated in the XBRLFormulaParametersResovler interface.

  Author:
    Ignacio
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MultiFormulaParameterResolver()` Instantiates a new multi formula parameter resolver.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.xml.namespace.QName` | `getParameterDataType(javax.xml.namespace.QName name)` Returns the type name of a parameter using the parameter name.
    `net.sf.saxon.s9api.XdmAtomicValue` | `getParameterValue(javax.xml.namespace.QName name, net.sf.saxon.s9api.Processor proc, javax.xml.namespace.QName dataType)` This function returns the parameter value assigned to a parameter name indicated by the name parameter.
    `boolean` | `hasValueForParameter(javax.xml.namespace.QName name, javax.xml.namespace.QName dataType)` Returns true if this Formula Parameter Resolver has value and data type for the parameter indicated in the name parameter.

    - ### Methods inherited from class java.util.Vector

      `add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize`

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

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

- - ### Constructor Detail

    - #### MultiFormulaParameterResolver

          public MultiFormulaParameterResolver()

      Instantiates a new multi formula parameter resolver.

  - ### Method Detail

    - #### getParameterDataType

          public javax.xml.namespace.QName getParameterDataType(javax.xml.namespace.QName name)

      Description copied from interface: `XBRLFormulaParametersResolver`
      Returns the type name of a parameter using the parameter name.
      Specified by:
        `getParameterDataType` in interface `XBRLFormulaParametersResolver`
      Parameters:
        `name` - the parameter name.
      Returns:
        a QName with the defined parameter data type or null if the resolver does not have a value for the parameter name.

    - #### getParameterValue

          public net.sf.saxon.s9api.XdmAtomicValue getParameterValue(javax.xml.namespace.QName name,
                                                            net.sf.saxon.s9api.Processor proc,
                                                            javax.xml.namespace.QName dataType)

      Description copied from interface: `XBRLFormulaParametersResolver`
      This function returns the parameter value assigned to a parameter name indicated by the name parameter.
      Specified by:
        `getParameterValue` in interface `XBRLFormulaParametersResolver`
      Parameters:
        `name` - the parameter name.
        `proc` - instance of the saxon Processor may be required for certain data types.
        `dataType` - This is the suggested data type. It may be null if not indicated in the formula linkbase.
      Returns:
        XdmAtomicValue or null if the resolver does not have a value for the parameter name.

    - #### hasValueForParameter

          public boolean hasValueForParameter(javax.xml.namespace.QName name,
                                     javax.xml.namespace.QName dataType)

      Description copied from interface: `XBRLFormulaParametersResolver`
      Returns true if this Formula Parameter Resolver has value and data type for the parameter indicated in the name parameter.
      Specified by:
        `hasValueForParameter` in interface `XBRLFormulaParametersResolver`
      Parameters:
        `name` - the parameter name
        `dataType` - the data type
      Returns:
        boolean, true or false