File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed
src/main/java/j/bridge/delegate Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
package j .bridge .delegate ;
2
2
3
- public class CountDisplay implements Displaible {
3
+ public class CountDisplay implements Displayable {
4
4
private final Display display ;
5
5
6
6
public CountDisplay (DisplayImpl impl ) {
Original file line number Diff line number Diff line change 1
1
package j .bridge .delegate ;
2
2
3
- public class Display implements Displaible {
3
+ public final class Display implements Displayable {
4
4
private final DisplayImpl impl ;
5
5
6
6
public Display (DisplayImpl impl ) {
Original file line number Diff line number Diff line change 1
1
package j .bridge .delegate ;
2
2
3
- public interface Displaible {
3
+ public interface Displayable {
4
4
void display ();
5
5
}
Original file line number Diff line number Diff line change 2
2
3
3
public class Main {
4
4
public static void main (String [] args ) {
5
- Displaible d1 = new Display (new StringDisplayImpl ("Hello, Japan." ));
6
- Displaible d2 = new CountDisplay (new StringDisplayImpl ("Hello, World." ));
5
+ Displayable d1 = new Display (new StringDisplayImpl ("Hello, Japan." ));
6
+ Displayable d2 = new CountDisplay (new StringDisplayImpl ("Hello, World." ));
7
7
CountDisplay d3 = new CountDisplay (new StringDisplayImpl ("Hello, Universe." ));
8
8
d1 .display ();
9
9
d2 .display ();
You can’t perform that action at this time.
0 commit comments