Class AddressIndexKeyIterator

  • All Implemented Interfaces:
    DBLongIterator

    public class AddressIndexKeyIterator
    extends java.lang.Object
    implements DBLongIterator
    Iterator of indexed fields that are addresses. The longs returned are the address longs.
    • Constructor Detail

      • AddressIndexKeyIterator

        public AddressIndexKeyIterator()
        Empty iterator.
      • AddressIndexKeyIterator

        public AddressIndexKeyIterator​(Table table,
                                       int indexCol,
                                       AddressMap addrMap,
                                       boolean atStart)
                                throws java.io.IOException
        Constructs a new AddressIndexKeyIterator. Memory addresses encoded as Absolute are not included.
        Parameters:
        table - the database table containing indexed addresses.
        indexCol - the column that contains indexed addresses.
        addrMap - the address map
        atStart - if true, iterates forward, otherwise iterates backwards.
        Throws:
        java.io.IOException - if a database io error occurs.
      • AddressIndexKeyIterator

        public AddressIndexKeyIterator​(Table table,
                                       int indexCol,
                                       AddressMap addrMap,
                                       Address minAddr,
                                       Address maxAddr,
                                       boolean atStart)
                                throws java.io.IOException
        Constructs a new AddressIndexKeyIterator for a range of addresses. Memory addresses encoded as Absolute are not included.
        Parameters:
        table - the database table containing indexed addresses.
        indexCol - the column that contains indexed addresses.
        addrMap - the address map
        minAddr - the first address in the range to iterate over.
        maxAddr - the last address in the range to iterator over.
        atStart - if true, iterates forward, otherwise iterates backwards.
        Throws:
        java.io.IOException - if a database io error occurs.
      • AddressIndexKeyIterator

        public AddressIndexKeyIterator​(Table table,
                                       int indexCol,
                                       AddressMap addrMap,
                                       AddressSetView set,
                                       boolean atStart)
                                throws java.io.IOException
        Constructs a new AddressIndexKeyIterator for a set of addresses. Memory addresses encoded as Absolute are not included.
        Parameters:
        table - the database table containing indexed addresses.
        indexCol - the column that contains indexed addresses.
        addrMap - the address map
        set - the set of addresses to iterator over.
        atStart - if true, iterates forward, otherwise iterates backwards.
        Throws:
        java.io.IOException - if a database io error occurs.
      • AddressIndexKeyIterator

        public AddressIndexKeyIterator​(Table table,
                                       int indexCol,
                                       AddressMap addrMap,
                                       boolean absolute,
                                       AddressSetView set,
                                       boolean atStart)
                                throws java.io.IOException
        Constructs a new AddressIndexKeyIterator for a set of addresses
        Parameters:
        table - the database table containing indexed addresses.
        indexCol - the column that contains indexed addresses.
        addrMap - the address map
        absolute - if true, only absolute memory address encodings are considered, otherwise only standard/relocatable address encodings are considered.
        set - the set of addresses to iterator over or null for all addresses.
        atStart - if true, iterates forward, otherwise iterates backwards.
        Throws:
        java.io.IOException - if a database io error occurs.
      • AddressIndexKeyIterator

        public AddressIndexKeyIterator​(Table table,
                                       int indexCol,
                                       AddressMap addrMap,
                                       Address start,
                                       boolean before)
                                throws java.io.IOException
        Constructs a new AddressIndexKeyIterator starting at a given address. Memory addresses encoded as Absolute are not included.
        Parameters:
        table - the database table containing indexed addresses.
        indexCol - the column that contains indexed addresses.
        addrMap - the address map
        start - the starting address for the iterator.
        before - if true, positions the iterator before start, otherwise positions it after start.
        Throws:
        java.io.IOException - if a database io error occurs.
    • Method Detail

      • hasNext

        public boolean hasNext()
                        throws java.io.IOException
        Description copied from interface: DBLongIterator
        Return true if a value is available in the forward direction.
        Specified by:
        hasNext in interface DBLongIterator
        Throws:
        java.io.IOException - thrown if an IO error occurs
        See Also:
        DBLongIterator.hasNext()
      • hasPrevious

        public boolean hasPrevious()
                            throws java.io.IOException
        Description copied from interface: DBLongIterator
        Return true if a value is available in the reverse direction
        Specified by:
        hasPrevious in interface DBLongIterator
        Throws:
        java.io.IOException - thrown if an IO error occurs
        See Also:
        DBLongIterator.hasPrevious()
      • next

        public long next()
                  throws java.io.IOException
        Description copied from interface: DBLongIterator
        Return the next long value.
        Specified by:
        next in interface DBLongIterator
        Throws:
        java.io.IOException - thrown if an IO error occurs
        See Also:
        DBLongIterator.next()
      • delete

        public boolean delete()
                       throws java.io.IOException
        Description copied from interface: DBLongIterator
        Delete the last record(s) associated with the last value read via the next or previous methods.
        Specified by:
        delete in interface DBLongIterator
        Returns:
        true if record(s) was successfully deleted.
        Throws:
        java.io.IOException - thrown if an IO error occurs.
        See Also:
        DBLongIterator.delete()