Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. public abstract class CatDecorator implements CatInterface {
  2. // Each decorator has "inner" cat that can be set in constructor. We are going to call
  3. // methods of inner cat in current cat
  4. protected CatInterface innerCat;
  5.  
  6. protected CatDecorator (CatInterface c){
  7. innerCat = c;
  8. }
  9.  
  10.  
  11. @Override
  12. public void doCatActions() {
  13. innerCat.doCatActions();
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement