MCPcopy Create free account
hub / github.com/RoaringBitmap/roaring / PeekNext

Method PeekNext

roaring.go:879–887  ·  view source on GitHub ↗

PeekNext peeks the next value without advancing the iterator

()

Source from the content-addressed store, hash-verified

877
878// PeekNext peeks the next value without advancing the iterator
879func (iui *unsetIterator) PeekNext() uint32 {
880 if !iui.HasNext() {
881 panic("PeekNext() called when HasNext() returns false")
882 }
883 if iui.iter == nil {
884 return (uint32(iui.nextKey) << 16) | uint32(iui.emptyContainerVal)
885 }
886 return uint32(iui.iter.peekNext()&maxLowBit) | iui.hs
887}
888
889// AdvanceIfNeeded advances as long as the next value is smaller than minval
890func (iui *unsetIterator) AdvanceIfNeeded(minval uint32) {

Callers

nothing calls this directly

Calls 2

HasNextMethod · 0.95
peekNextMethod · 0.65

Tested by

no test coverage detected