Class AddressKeyAddressIterator

  • All Implemented Interfaces:
    AddressIterator, java.lang.Iterable<Address>, java.util.Iterator<Address>

    public class AddressKeyAddressIterator
    extends java.lang.Object
    implements AddressIterator
    Converts an AddressKeyIterator or an addressKeyAddressIterator into an AddressIterator
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()
      Checks if there is a next address in the iteration.
      java.util.Iterator<Address> iterator()  
      Address next()
      Get the next address.
      void remove()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
    • Constructor Detail

      • AddressKeyAddressIterator

        public AddressKeyAddressIterator​(DBLongIterator keyIter,
                                         boolean forward,
                                         AddressMap addrMap,
                                         ErrorHandler errHandler)
        Constructor.
        Parameters:
        keyIter - address key iterator, may be null. All long values must decode properly with the specified addrMap.
        forward - true to iterate in the direction of increasing addresses.
        addrMap - address map
        errHandler - IO error handler (may be null)
    • Method Detail

      • next

        public Address next()
        Description copied from interface: AddressIterator
        Get the next address.

        NOTE: This deviates from the standard Iterator interface by returning null instead of throwing an exception.

        Specified by:
        next in interface AddressIterator
        Specified by:
        next in interface java.util.Iterator<Address>
        Returns:
        the next address in the iteration.
        See Also:
        AddressIterator.next()
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<Address>
        See Also:
        Iterator.remove()
      • iterator

        public java.util.Iterator<Address> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<Address>