Skip to content

Commit 1330602

Browse files
committed
Comments for mediator example.
1 parent 40e5444 commit 1330602

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

mediator/src/main/java/com/iluwatar/App.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
package com.iluwatar;
22

3+
/**
4+
*
5+
* Mediator encapsulates how set of objects (PartyMember) interact.
6+
* Instead of referring to each other directly they
7+
* use the mediator (Party) interface.
8+
*
9+
*/
310
public class App
411
{
512
public static void main( String[] args )

mediator/src/main/java/com/iluwatar/Party.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
package com.iluwatar;
22

3+
/**
4+
*
5+
* Mediator interface.
6+
*
7+
*/
38
public interface Party {
49

510
void addMember(PartyMember member);

mediator/src/main/java/com/iluwatar/PartyMember.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
package com.iluwatar;
22

3+
/**
4+
*
5+
* Interface for party members interacting with Party.
6+
*
7+
*/
38
public interface PartyMember {
49

510
void joinedParty(Party party);

0 commit comments

Comments
 (0)