Class MemoryOutputIterator

  • All Implemented Interfaces:
    Iterator<Object[]>

    public class MemoryOutputIterator
    extends Object
    implements Iterator<Object[]>
    Iterator which loops through the keys and values stored in the MemoryOutputFormatter This class is a wrapper for MultiKeyPlanItDataIterator.
    Author:
    gman6028
    • Constructor Detail

      • MemoryOutputIterator

        public MemoryOutputIterator​(MultiKeyPlanItData multiKeyPlanItData)
        Constructor
        Parameters:
        multiKeyPlanItData - the MultiKeyPlanItData object storing the data, provided by the MemoryOutputFormatter
    • Method Detail

      • hasNext

        public boolean hasNext()
        Returns whether the MemoryOutputFormatter has any more rows
        Specified by:
        hasNext in interface Iterator<Object[]>
        Returns:
        true if the MemoryOutputFormatter has any rows, false otherwise
      • next

        public Object[] next()
        Returns the next array of keys in the iteration
        Specified by:
        next in interface Iterator<Object[]>
        Returns:
        the next array of keys in the iteration
      • getKeys

        public Object[] getKeys()
        Returns an array of keys for the current iteration
        Returns:
        array of keys for the current iteration
      • getValues

        public Object[] getValues()
        Returns an array of values for the current iteration
        Returns:
        array of values for the current iteration