Class RefreshableAddressProvider.CircularIterator

  • All Implemented Interfaces:
    Iterator
    Enclosing class:
    RefreshableAddressProvider

    protected class RefreshableAddressProvider.CircularIterator
    extends Object
    implements Iterator
    An Iterator implementation that can be converted into circular mode to allow the remaining addresses and previously skipped addresses to be used; typically set once an address has been accepted.
    • Field Detail

      • m_fCircular

        protected boolean m_fCircular
        Whether this Iterator is currently in a circular mode.
      • m_iterator

        protected Iterator m_iterator
        The iterator used to implement the AddressProvider interface.
    • Constructor Detail

      • CircularIterator

        protected CircularIterator()
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface Iterator
      • remove

        public void remove()
        Specified by:
        remove in interface Iterator
      • setCircular

        public void setCircular​(boolean fCircular)
        Set whether the Iterator should operate in a circular mode.
        Parameters:
        fCircular - whether the Iterator should operate in a circular mode
      • ensureIterator

        protected Iterator ensureIterator()
        Return the cache iterator.
        Returns:
        the cache iterator
      • refreshIterator

        protected void refreshIterator()
        Set the value of m_iterator to a new iterator from the address list, and ensure the address list is refreshed.