Class StreamOperatorCollapseRuns.OperatorImpl

java.lang.Object
CollapseRunsOperationBase<T,K,V>.AccumulatorBase
org.aksw.commons.util.stream.StreamOperatorCollapseRuns.OperatorImpl
Enclosing class:
StreamOperatorCollapseRuns<T,K,V>

public class StreamOperatorCollapseRuns.OperatorImpl extends CollapseRunsOperationBase<T,K,V>.AccumulatorBase
TODO This class could be turned into a spliterator as follows: Upon splitting, consume one list of items with the same group key from the rhs. Append this list to the spliterator of the lhs.
Author:
raven
  • Field Details

    • upstream

      protected Iterator<T> upstream
    • downstream

      protected Iterator<Map.Entry<K,V>> downstream
    • item

      protected T item
      The last seen item
    • hasPendingGroup

      protected boolean hasPendingGroup
      If there is a pending group it will create a new accumulator on the next call to computeNext()
    • pendingGroupKey

      protected K pendingGroupKey
  • Constructor Details

    • OperatorImpl

      public OperatorImpl(Iterator<T> upstream)
  • Method Details

    • getLastSeenItem

      public T getLastSeenItem()
    • getDownstream

      public Iterator<Map.Entry<K,V>> getDownstream()