]> Sergey Matveev's repositories - btrtrc.git/blob - typed-roaring/iterator.go
Add fallback piece ordering for non-readahead priorities
[btrtrc.git] / typed-roaring / iterator.go
1 package typedRoaring
2
3 import (
4         "github.com/RoaringBitmap/roaring"
5 )
6
7 type Iterator[T BitConstraint] struct {
8         roaring.IntPeekable
9 }
10
11 func (t Iterator[T]) Next() T {
12         return T(t.IntPeekable.Next())
13 }
14
15 func (t Iterator[T]) AdvanceIfNeeded(minVal T) {
16         t.IntPeekable.AdvanceIfNeeded(uint32(minVal))
17 }