We are not suggesting that every use of
Map be encapsulated in this form. Rather, we are advising you not to pass
Maps (or any other interface at a boundary) around your system. If you use a boundary interface like
Map, keep it inside the class, or close family of classes, where it is used. Avoid returning it from, or accepting it as an argument to, public APIs.
This is quite curious, review it, and check if it's a practice that it's accepted or not.
Share this highlighthttp://www.safaribooksonline.com/a/clean-code/30994/