final boolean doAdvance(){
  if (buffer == null) {
    if (finished)     return false;
    init();
    initPartialTraversalState();
    nextToConsume=0;
    bufferSink.begin(spliterator.getExactSizeIfKnown());
    return fillBuffer();
  }
 else {
    ++nextToConsume;
    boolean hasNext=nextToConsume < buffer.count();
    if (!hasNext) {
      nextToConsume=0;
      buffer.clear();
      hasNext=fillBuffer();
    }
    return hasNext;
  }
}

final boolean doAdvance ( ) { if ( buffer == null ) { if ( finished ) return false ; init ( ) ; initPartialTraversalState ( ) ; nextToConsume = 0 ; bufferSink . begin ( spliterator . getExactSizeIfKnown ( ) ) ; return fillBuffer ( ) ; } else { ++ nextToConsume ; boolean hasNext = nextToConsume < buffer . count ( ) ; if ( ! hasNext ) { nextToConsume = 0 ; buffer . clear ( ) ; hasNext = fillBuffer ( ) ; } return hasNext ; } }
get an element from the source , pushing it into the sink chain , setting up the buffer if needed
