PeekNext peeks the next value without advancing the iterator
()
| 877 | |
| 878 | // PeekNext peeks the next value without advancing the iterator |
| 879 | func (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 |
| 890 | func (iui *unsetIterator) AdvanceIfNeeded(minval uint32) { |