<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倉庫 |  文件格式轉換 
    主站蜘蛛池模板: 在线观看免费黄色网址| 亚洲色大18成人网站WWW在线播放| 美景之屋4在线未删减免费| 日本免费一二区在线电影| 亚洲综合激情五月色一区| 免费观看大片毛片| www亚洲精品久久久乳| 亚洲AV伊人久久青青草原| 在线观看亚洲网站| 亚洲精品高清在线| 黄桃AV无码免费一区二区三区| 亚洲伊人久久大香线蕉综合图片| 成人A毛片免费观看网站| 亚洲va在线va天堂va不卡下载| 久久久久成人片免费观看蜜芽| 亚洲视频免费播放| 美女内射毛片在线看免费人动物| 亚洲av成人一区二区三区| 在线免费观看一区二区三区| 另类图片亚洲校园小说区| 亚洲综合av永久无码精品一区二区 | 亚洲日韩看片无码电影| 色www永久免费视频| 一二三四在线观看免费中文在线观看| 亚洲婷婷国产精品电影人久久| 国产免费爽爽视频在线观看| 亚洲美女精品视频| 免费一级成人毛片| 日本高清高色视频免费| 国产成人亚洲综合网站不卡| 亚洲第一成人影院| 国产人成免费视频网站| 黄色片网站在线免费观看| 久久精品国产精品亚洲蜜月| 免费可以在线看A∨网站| 一级黄色免费大片| 久久精品国产亚洲av麻豆小说 | 亚洲国产香蕉碰碰人人| 国产又大又长又粗又硬的免费视频| 久久久久久久国产免费看 | 国产成人亚洲影院在线观看|