Added comments for bridge example.
This commit is contained in:
@ -1,5 +1,14 @@
|
||||
package com.iluwatar;
|
||||
|
||||
/**
|
||||
*
|
||||
* In Bridge pattern both abstraction (MagicWeapon)
|
||||
* and implementation (MagicWeaponImp) have their
|
||||
* own class hierarchies. The interface of the
|
||||
* implementations can be changed without affecting
|
||||
* the clients.
|
||||
*
|
||||
*/
|
||||
public class App
|
||||
{
|
||||
public static void main( String[] args )
|
||||
|
@ -1,5 +1,10 @@
|
||||
package com.iluwatar;
|
||||
|
||||
/**
|
||||
*
|
||||
* Abstraction interface.
|
||||
*
|
||||
*/
|
||||
public abstract class MagicWeapon {
|
||||
|
||||
protected MagicWeaponImp imp;
|
||||
|
@ -1,5 +1,10 @@
|
||||
package com.iluwatar;
|
||||
|
||||
/**
|
||||
*
|
||||
* Implementation interface.
|
||||
*
|
||||
*/
|
||||
public abstract class MagicWeaponImp {
|
||||
|
||||
public abstract void wieldImp();
|
||||
|
Reference in New Issue
Block a user