question: int put ( T segment , List < ? super T > recycleBin ) { int count ; if ( lastCount == 0 ) { count = 0 ; lastCount = 1 ; last = segment ; } else if ( Objects . deepEquals ( last , segment ) ) { ++ lastCount ; count = 0 ; recycleBin . add ( segment ) ; } else { count = lastCount ; lastCount = 1 ; last = segment ; } return count ; }
target:  Adds an element to the stream. If that element is the same as the last element this buffer saw, it won't be added to the stream, but will instead be recycled. If this element is different than the one before, this class will return the number of times that other element had been seen. The caller is responsible for having retrieved that element before calling this method.