1c: Added DecoratorPattern - StringDecorator
This commit is contained in:
parent
728dd877bd
commit
ebab952bd9
23
ueb05_news_example/src/decorator/StringDecorator.java
Normal file
23
ueb05_news_example/src/decorator/StringDecorator.java
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
package decorator;
|
||||||
|
|
||||||
|
import model.Item;
|
||||||
|
|
||||||
|
public abstract class StringDecorator extends Item {
|
||||||
|
protected Item wrappee;
|
||||||
|
|
||||||
|
public StringDecorator(Item item) {
|
||||||
|
this.wrappee = item;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOverview() {
|
||||||
|
return wrappee.getOverview();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDetails() {
|
||||||
|
return wrappee.getDetails();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return wrappee.getTitle();
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user