package io.leonis.zosma.ipc.peripheral;

import io.leonis.zosma.game.Identity;
import java.util.*;

/**
 * The Interface Controller.
 *
 * This interface describes the functionality of a controller which maps an entity's identifier
 * to the controls provided by the underlying implementation.
 *
 * @param <I> The type of identifier used to denote the controlled entity.
 * @param <S> The type of controls provided by the controller.
 * @author Jeroen de Jong
 */
public interface Controller<I extends Identity, S> {
  /**
   * @return The identifier to which this controller links its controls.
   */
  I getIdentifier();

  /**
   * @return The controls provided by the controller.
   */
  S getControls();

  /**
   * Supplies a mapping of {@link Controller} to {@link Identity} of objects it is controlling.
   * 
   * @param <C> The type of {@link Controller} being supplied.
   * @param <A> The type of {@link Identity} of the object it is controlling.
   */
  interface MappingSupplier<C extends Controller, A extends Identity> {
    Map<C, Set<A>> getAgentMapping();
  }
}

@@ -339,14 +339,16 @@
  to 
+i
 den
-ote
+tify
  the
@@ -361,17 +361,9 @@
 olle
-d entity.
+r
 %0A * 
@@ -502,16 +502,42 @@
 tity, S%3E
+ extends Identity.Supplier
  %7B%0A  /**
@@ -569,21 +569,14 @@
 ier 
-to which this
+of the
  con
@@ -586,27 +586,8 @@
 ller
- links its controls
 .%0A  
@@ -603,20 +603,18 @@
 etIdenti
-fier
+ty
 ();%0A%0A  /
@@ -802,17 +802,16 @@
 ng.%0A   *
- 
 %0A   * @p

Update Controller to conform to Identity.Supplier (#26)