1
edit
Changes
→Example
----
Abstract Component class:
public abstract class InputStream {
abstract int read();
}
Concrete Component class:
class FileInputStream extends InputStream
{
public int read();
}
Decorator class:
public
class FilterInputStream extends InputStream {
protected FilterInputStream(InputStream in) {
}
}
}
Concrete Decorator class:
public
class PushbackInputStream extends FilterInputStream {