<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>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                ~~~ /* Decorator 裝飾模式: 動態地給一個對象添加一些額外的職責,就增加功能來說,裝飾模式比生成子類更為靈活。 個人想法:注意裝飾器內部維護一個對象,所有裝飾器的子類在操作時,必須調用父類的函數,一直從下到上再到下的感覺 作者: HCLAC 日期: 20170308 */ package decorator import ( "fmt" ) type person struct { Name string } func (p *person) show() { if p == nil { return } fmt.Println("姓名:", p.Name) } type AbsstractPerson interface { show() } type Decorator struct { AbsstractPerson } func (d *Decorator) SetDecorator(component AbsstractPerson) { if d == nil { return } d.AbsstractPerson = component } func (d *Decorator) show() { if d == nil { return } if d.AbsstractPerson != nil { d.AbsstractPerson.show() } } type TShirts struct { Decorator } func (t *TShirts) show() { if t == nil { return } t.Decorator.show() fmt.Println("T恤") } type BigTrouser struct { Decorator } func (b *BigTrouser) show() { if b == nil { return } b.Decorator.show() fmt.Println("大褲衩") } type Sneakers struct { Decorator } func (b *Sneakers) show() { if b == nil { return } b.Decorator.show() fmt.Println("破球鞋") } ~~~
                  <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>

                              哎呀哎呀视频在线观看