<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ~~~ /* Iterator 迭代器模式: 提供一種方法順序訪問一個聚合對象中的各個元素,而又不暴露該對象的內部表示 個人想法: 作者: HCLAC 日期: 20170310 */ package iterator //"fmt" type Book struct { name string } type Iterator interface { first() interface{} next() interface{} } type BookGroup struct { books []Book } func (b *BookGroup) add(newb Book) { if b == nil { return } b.books = append(b.books, newb) } func (b *BookGroup) createIterator() *BookIterator { if b == nil { return nil } return &BookIterator{b, 0} } type BookIterator struct { g *BookGroup index int } func (b *BookIterator) first() interface{} { if b == nil { return nil } if len(b.g.books) > 0 { b.index = 0 return b.g.books[b.index] } return nil } func (b *BookIterator) next() interface{} { if b == nil { return nil } if len(b.g.books) > b.index+1 { b.index++ return b.g.books[b.index] } return nil } ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看