com.ihr.xbrl.om.formula.util

## Class LookForwardAndFilterIterator

- java.lang.Object
- - com.ihr.xbrl.om.formula.util.LookForwardAndFilterIterator

-     public class LookForwardAndFilterIterator
      extends java.lang.Object

  This class belongs to the formula optimization and shall not be used by developers using the API

  This class wraps a ClsVarIterator so it looks forward on the surrounding iterator and performs a filter on the returned values. If the values pass the filter, then they will be returned in a call to next() (and the look forward process will start again) if the values do not pass the filter then a call to hasNext() will return false and no further calls to next() shall be performed.

  Author:
    Ignacio

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LookForwardAndFilterIterator(java.util.Collection<net.sf.saxon.s9api.XdmValue> hsOutSeq, XBRLVariableResourceUse var, XBRLVariablesHolder set, XFIImplicitFilterOptimizer optimizer, Filter filter)` Instantiates a new look forward and filter iterator.
    `LookForwardAndFilterIterator(net.sf.saxon.s9api.XdmValue value, XBRLVariableResourceUse var, XBRLVariablesHolder set, XFIImplicitFilterOptimizer optimizer, Filter filter)` Instantiates a new look forward and filter iterator.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `hasNext()` Checks for next.
    `boolean` | `isFallbackValue()` Checks if is fallback value.
    `net.sf.saxon.s9api.XdmValue` | `next()` Next.
    `void` | `restart()` Restart.
    `long` | `size()` Size.

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

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LookForwardAndFilterIterator

          public LookForwardAndFilterIterator(net.sf.saxon.s9api.XdmValue value,
                                      XBRLVariableResourceUse var,
                                      XBRLVariablesHolder set,
                                      XFIImplicitFilterOptimizer optimizer,
                                      Filter filter)
                                       throws XFValidationException

      Instantiates a new look forward and filter iterator.
      Parameters:
        `value` - the value
        `var` - the var
        `set` - the set
        `optimizer` - the optimizer
        `filter` - the filter
      Throws:
        `XFValidationException` - the XF validation exception

    - #### LookForwardAndFilterIterator

          public LookForwardAndFilterIterator(java.util.Collection<net.sf.saxon.s9api.XdmValue> hsOutSeq,
                                      XBRLVariableResourceUse var,
                                      XBRLVariablesHolder set,
                                      XFIImplicitFilterOptimizer optimizer,
                                      Filter filter)
                                       throws XFValidationException

      Instantiates a new look forward and filter iterator.
      Parameters:
        `hsOutSeq` - the hs out seq
        `var` - the var
        `set` - the set
        `optimizer` - the optimizer
        `filter` - the filter
      Throws:
        `XFValidationException` - the XF validation exception

  - ### Method Detail

    - #### next

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

      Next.
      Returns:
        the xdm value

    - #### hasNext

          public boolean hasNext()
                          throws XFValidationException

      Checks for next.
      Returns:
        true, if successful
      Throws:
        `XFValidationException` - the XF validation exception

    - #### restart

          public void restart()
                       throws XFValidationException

      Restart.
      Throws:
        `XFValidationException` - the XF validation exception

    - #### isFallbackValue

          public boolean isFallbackValue()
                                  throws XFValidationException

      Checks if is fallback value.
      Returns:
        true, if is fallback value
      Throws:
        `XFValidationException` - the XF validation exception

    - #### size

          public long size()

      Size.
      Returns:
        the long