// Next will use the S3API client to iterate through a list of objects.
177010
func (iter *DeleteListIterator) Next() bool {
	if len(iter.objects) > 0 {
		iter.objects = iter.objects[1:]
	}

	if len(iter.objects) == 0 && iter.Paginator.Next() {
		iter.objects = iter.Paginator.Page().(*s3.ListObjectsOutput).Contents
	}

	return len(iter.objects) > 0
}
1055725
func (iter *UnionIter) Next() error {
	var err error
	if !iter.curIsDirty {
		err = iter.snapshotNext()
	} else {
		err = iter.dirtyNext()
	}
	if err != nil {
		return err
	}
	err = iter.updateCur()
	return err
}
72042
func (li *MemberListIterator) Next(ctx context.Context, items *[]Member) bool {
	if li.err != nil {
		return false
	}
	li.err = li.fetch(ctx, li.Paging.Next)
	if li.err != nil {
		return false
	}
	*items = li.Lists
	if len(li.Lists) == 0 {
		return false
	}
	return true
}
749856
func (it *ReaderIteratorImpl) Next() (v int64, err error) {
	nextValues, err := it.nextN(1)
	if err != nil {
		return 0, err
	}
	assert(len(nextValues) > 0)
	return nextValues[0], nil
}
1190099
func (e *ByteIntervalElement) Next() *ByteIntervalElement {
	if p := e.next; e.list != nil && p != &e.list.root {
		return p
	}
	return nil
}
569928
func (iter *iterator) Next() error {
	if len(iter.cursors) <= 0 {
		return ErrIteratorDone
	}

	lastK := iter.cursors[0].k

	for len(iter.cursors) > 0 {
		next := iter.cursors[0]

		if next.ssIndex < 0 && next.sc == nil {
			err := iter.lowerLevelIter.Next()
			if err == nil {
				next.k, next.v, err = iter.lowerLevelIter.Current()
				if err == nil && len(iter.cursors) > 1 {
					heap.Fix(iter, 0)
				}
			}

			if err != nil {
				iter.lowerLevelIter.Close()
				iter.lowerLevelIter = nil

				heap.Pop(iter)
			}
		} else {
			err := next.sc.Next()
			if err != nil {
				if err != ErrIteratorDone {
					return err
				}
				heap.Pop(iter)
			} else {
				next.op, next.k, next.v = next.sc.Current()
				if next.op == 0 {
					heap.Pop(iter)
				} else if len(iter.cursors) > 1 {
					heap.Fix(iter, 0)
				}
			}
		}

		if len(iter.cursors) <= 0 {
			return ErrIteratorDone
		}

		if !iteratorBytesEqual(iter.cursors[0].k, lastK) {
			if !iter.iteratorOptions.IncludeDeletions &&
				iter.cursors[0].op == OperationDel {
				lastK = iter.cursors[0].k
				continue
			}

			return nil
		}
	}

	return ErrIteratorDone
}
700885
func (iter *Iterator) Next() bool {
	if iter.first {
		iter.first = false
		return iter.n != nil
	}

	iter.n = iter.n.children[1]
	return iter.n != nil
}
267289
func (r *boltRows) Next(dest []driver.Value) error {
	data, _, err := r.NextNeo()
	if err != nil {
		return err
	}

	for i, item := range data {
		switch item := item.(type) {
		case []interface{}, map[string]interface{}, graph.Node, graph.Path, graph.Relationship, graph.UnboundRelationship:
			dest[i], err = encoding.Marshal(item)
			if err != nil {
				return err
			}
		default:
			dest[i], err = driver.DefaultParameterConverter.ConvertValue(item)
			if err != nil {
				return err
			}
		}
	}

	return nil

}
229072
func (iter *sparseBitArrayIterator) Next() bool {
	iter.index++
	return iter.index < int64(len(iter.sba.indices))
}
375962
func (m *MergeIterator) Next() error {
	// move all the current low iterators to next
	for _, vi := range m.lowIdxs {
		err := m.itrs[vi].Next()
		if err != nil && err != ErrIteratorDone {
			return err
		}
		m.currKs[vi], m.currVs[vi] = m.itrs[vi].Current()
	}
	m.updateMatches()
	if m.lowK == nil {
		return ErrIteratorDone
	}
	return nil
}
1208594
func (d *ManyToOneEnvelope) Next() *events.Envelope {
	data := d.d.Next()
	return (*events.Envelope)(data)
}
761818
func (iter *CombinationIterator) Next() []interface{} {
	if !iter.HasNext() {
		return nil
	}

	if iter.res[0] != nil {
		i := iter.r - 1
		for ; i > -1; i-- {
			if iter.indices[i] != i+iter.n-iter.r {
				break
			}
		}
		if i > -1 {
			iter.indices[i] += 1
			for j := i + 1; j < iter.r; j++ {
				iter.indices[j] = iter.indices[j-1] + 1
			}
		}
	}

	for j := 0; j < iter.r; j++ {
		iter.res[j] = iter.pool[iter.indices[j]]
	}

	iter.iters += 1

	return iter.res
}
590865
func (e *ItemElement) Next() *ItemElement {
	if p := e.next; e.list != nil && p != &e.list.root {
		return p
	}
	return nil
}
1196642
func (t *towerListIterator) Next() (*wtdb.Tower, error) {
	t.mu.Lock()
	defer t.mu.Unlock()

	// If the next candidate is nil, we've exhausted the list.
	if t.nextCandidate == nil {
		return nil, ErrTowerCandidatesExhausted
	}

	// Propose the tower at the front of the list.
	tower := t.nextCandidate.Value.(*wtdb.Tower)

	// Set the next candidate to the subsequent element.
	t.nextCandidate = t.nextCandidate.Next()

	return tower, nil
}
933112
func (b *ByteBuffer) Next(n int) []byte {
	b.Lock()
	defer b.Unlock()
	return b.b.Next(n)
}
830769
func (f *FollowingList) Next() (*FollowingList, error) {
	limit := f.limit
	if limit < 1 {
		limit = uint(len(f.Blogs))
	}
	offset := f.offset + limit
	if offset >= uint(f.Total) {
		return nil, NoNextPageError
	}
	return GetFollowing(f.client, offset, limit)
}
1006381
func (iter *PermutationIterator) Next() []interface{} {
	if !iter.HasNext() {
		return nil
	}

	if iter.res[0] != nil {
		for i := iter.r - 1; i > -1; i-- {
			iter.cycles[i] -= 1
			if iter.cycles[i] == 0 {
				for x := i; x < iter.n-1; x++ {
					v := iter.indices[x]
					iter.indices[x] = iter.indices[x+1]
					iter.indices[x+1] = v
				}
				iter.cycles[i] = iter.n - i
			} else {
				x := iter.indices[i]
				iter.indices[i] = iter.indices[iter.n-iter.cycles[i]]
				iter.indices[iter.n-iter.cycles[i]] = x
				break
			}
		}
	}

	for i := 0; i < iter.r; i++ {
		iter.res[i] = iter.pool[iter.indices[i]]
	}

	iter.iters += 1

	return iter.res
}