Class SearchObjectAggregator

  • All Implemented Interfaces:
    java.util.Iterator<SearchObject>

    public class SearchObjectAggregator
    extends SearchObjectCursor
    implements java.util.Iterator<SearchObject>

    An implementation of Iterator<SearchObject> that aggregates multiple SearchObjectCursor objects. This class deals with the idea that a SearchObjectCursor will return either a SearchObject directly or in some cases, another SearchObjectCursor.

    The SearchObjectAggregator can optionally be given a TaskProgressListener, which it will monitor for cancellation, so that the individual cursors don't need to worry about task cancellation.

    • Method Detail

      • onFinished

        protected void onFinished()
        Override this to be notified when this iterator has been exhausted
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<SearchObject>
      • next

        public SearchObject next()
        Description copied from class: SearchObjectCursor
        Gets the next search object, which might be a SearchObject or a SearchObjectCursor. Null is returned at the end of the stream to signify that the cursor is exhausted.
        Specified by:
        next in interface java.util.Iterator<SearchObject>
        Specified by:
        next in class SearchObjectCursor
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<SearchObject>