开发者

MapMaker Design Pattern?

开发者 https://www.devze.com 2023-01-18 14:04 出处:网络
I was impressed by google\'s MapMaker design.I would like to know what is the name of the pattern that is used here ?

I was impressed by google's MapMaker design.I would like to know what is the name of the pattern that is used here ?

( What i think is it's somewhat like decorator pattern but in which we don't have to wrap the object in other object to extend the functionality,but I can't figure out exactly what sort of pattern it is. )

MapMaker Object Creation:-

Conc开发者_JAVA百科urrentMap<Key, Graph> graphs = new MapMaker()
      .concurrencyLevel(32)
      .softKeys()
      .weakValues()
      .expiration(30, TimeUnit.MINUTES)
      .makeComputingMap(
          new Function<Key, Graph>() {
            public Graph apply(Key key) {
              return createExpensiveGraph(key);
            }
          });


It is a Builder with a Fluent api


Builder and/or Fluent Interface

http://en.wikipedia.org/wiki/Fluent_interface

http://en.wikipedia.org/wiki/Builder_pattern


I think it's kind of Builder.

0

精彩评论

暂无评论...
验证码 换一张
取 消