<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Feeling

        三人行,必有我師焉

       ::  :: 新隨筆 :: 聯系 ::  :: 管理 ::
      185 隨筆 :: 0 文章 :: 392 評論 :: 0 Trackbacks

    comparator 

    Decorator Pattern and Adapter Pattern have the same alias name: wrapper. But they face different aspects. Decorator pattern changes the object function, but the adapter pattern changes the interface.

    The typical decorator pattern is the java OutputStream, you can use the BufferedOutputStream to wrap it, then get the extra function.
    The typical adapter pattern in the BIRT is the ElementAdapter, it can convert any object to an other object.

    Decorator pattern must extend the class which you want to wrap, but the adapter class must implements the interface using by the client.


    FlyWeight pattern extracts the same part of some different objects, and the part doesn't be changed when these objects changed. String class uses the FlyWeight pattern, jface 
    ImageRegistry also uses it. 
    FlyWeight can have a interface to get external data, and change the external data's status, but FlyWeight internal status shouldn't be changed.

    The Collections.sort() method implementation contains template method design pattern and strategy design pattern, but it doesn't contain the visitor design pattern. The Collections.sort() method uses the merge sort algorithm, you can't change it, but you can change the comparator logic, it's one step of the sort algorithm. So it's a template method pattern, but not a classic implementation, it uses the callback method to implement the pattern, but not extending the parent template class. The comparator class use the strategy design pattern, it not a visitor pattern, visitor pattern have a accept method to operate the element to deal some logic. 



    posted on 2012-11-14 00:22 三人行,必有我師焉 閱讀(330) 評論(0)  編輯  收藏

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    GitHub |  開源中國社區 |  maven倉庫 |  文件格式轉換 
    主站蜘蛛池模板: 久久久免费观成人影院| 亚洲国产片在线观看| 国产成人精品亚洲| 午夜免费不卡毛片完整版| 国产成人精品日本亚洲直接| 在线看片v免费观看视频777| 精品日韩亚洲AV无码| 18成禁人视频免费网站| 亚洲美女激情视频| 成人免费视频网站www| 亚洲国产乱码最新视频| 最近免费中文字幕大全视频| 亚洲欧美日韩中文无线码| 日韩免费电影在线观看| 国产亚洲漂亮白嫩美女在线| 亚洲国产精品综合久久一线| 一级黄色免费大片| 亚洲av日韩av不卡在线观看| 91免费在线播放| 亚洲AV无码专区在线观看成人| www.亚洲色图| 日韩免费人妻AV无码专区蜜桃| 亚洲成a人片在线看| 国产女高清在线看免费观看 | 亚洲人成影院77777| 亚洲中文无码永久免费| 理论亚洲区美一区二区三区| 久久久久亚洲AV无码专区桃色| 香港a毛片免费观看 | 久久九九AV免费精品| 亚洲美女视频免费| 青青草国产免费久久久下载| 牛牛在线精品观看免费正 | 亚洲色偷偷综合亚洲av78| 免费看国产一级片| 女人体1963午夜免费视频| 亚洲午夜精品久久久久久app| 亚洲国产成人久久精品99| 97在线视频免费| 免费激情网站国产高清第一页| 亚洲精品在线观看视频|