Comments for mediator example.

This commit is contained in:
Ilkka Seppala 2014-08-31 11:07:37 +03:00
parent 40e5444718
commit 13306023f0
3 changed files with 17 additions and 0 deletions

View File

@ -1,5 +1,12 @@
package com.iluwatar;
/**
*
* Mediator encapsulates how set of objects (PartyMember) interact.
* Instead of referring to each other directly they
* use the mediator (Party) interface.
*
*/
public class App
{
public static void main( String[] args )

View File

@ -1,5 +1,10 @@
package com.iluwatar;
/**
*
* Mediator interface.
*
*/
public interface Party {
void addMember(PartyMember member);

View File

@ -1,5 +1,10 @@
package com.iluwatar;
/**
*
* Interface for party members interacting with Party.
*
*/
public interface PartyMember {
void joinedParty(Party party);