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