Is this a well known design pattern? What is its name?

前端 未结 8 1604
滥情空心
滥情空心 2020-12-06 04:54

I have seen this often in code, but when I speak of it I don\'t know the name for such \'pattern\'

I have a method with 2 arguments that calls an overloaded method t

8条回答
  •  醉酒成梦
    2020-12-06 05:24

    It's an example of a helper method. Sheesh people, not being in the Gang of Four book doesn't stop it being a pattern. In the specific case where there helper is public and the helped method is private it's an example of encapsulation. Possibly a little too much encapsulation in this case.

提交回复
热议问题