hermes
Class InteractionHandler<A extends HObject,B extends HObject>

java.lang.Object
  extended by hermes.InteractionHandler<A,B>

public class InteractionHandler<A extends HObject,B extends HObject>
extends java.lang.Object

This class contains support code for detecting interactions and handling them. The only time you will encounter this class is when is when writing an Optimizer, where you use this class to handle the interactions for you.

Author:
Sam

Method Summary
 boolean interactionHandler(A being1, B being2)
          Checks if an interaction is detected between being1 and being2.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

interactionHandler

public boolean interactionHandler(A being1,
                                  B being2)
Checks if an interaction is detected between being1 and being2. If the interaction is immediate, synchronizes on the beings and handles the interaction, otherwise adds a new DetectedInteraction object to the detectedInteractionsQueue.

Parameters:
being1 - the first interacting Being
being2 - the second interacting Being
Returns:
whether an interaction was detected