You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

shortiterator.go 302B

123456789101112131415161718192021
  1. package roaring
  2. type shortIterable interface {
  3. hasNext() bool
  4. next() uint16
  5. }
  6. type shortIterator struct {
  7. slice []uint16
  8. loc int
  9. }
  10. func (si *shortIterator) hasNext() bool {
  11. return si.loc < len(si.slice)
  12. }
  13. func (si *shortIterator) next() uint16 {
  14. a := si.slice[si.loc]
  15. si.loc++
  16. return a
  17. }