Comments for mediator example.
This commit is contained in:
parent
40e5444718
commit
13306023f0
@ -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 )
|
||||
|
@ -1,5 +1,10 @@
|
||||
package com.iluwatar;
|
||||
|
||||
/**
|
||||
*
|
||||
* Mediator interface.
|
||||
*
|
||||
*/
|
||||
public interface Party {
|
||||
|
||||
void addMember(PartyMember member);
|
||||
|
@ -1,5 +1,10 @@
|
||||
package com.iluwatar;
|
||||
|
||||
/**
|
||||
*
|
||||
* Interface for party members interacting with Party.
|
||||
*
|
||||
*/
|
||||
public interface PartyMember {
|
||||
|
||||
void joinedParty(Party party);
|
||||
|
Loading…
x
Reference in New Issue
Block a user