本站源代码
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.

22 lines
302B

  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. }
上海开阖软件有限公司 沪ICP备12045867号-1