Package org.baseagent.comms
Class InRangeCommunicator
java.lang.Object
org.baseagent.sim.SimulationComponent
org.baseagent.comms.Communicator
org.baseagent.comms.InRangeCommunicator
- All Implemented Interfaces:
SimulationListener
Sends the message to all listeners who are within the range specified in the constructor.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.baseagent.sim.SimulationComponent
SimulationComponent.Type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetExpectedRecipients(Message message) doublegetRange()voidsetRange(double range) Methods inherited from class org.baseagent.comms.Communicator
getType, sendDirectedMessage, sendMessageMethods inherited from class org.baseagent.sim.SimulationComponent
getSimulation, getUUID, setSimulationMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.baseagent.sim.SimulationListener
onAfterStepEnded, onAfterStepStarted, onBeforeStepEnded, onBeforeStepStarted, onSimulationComponentAdded, onSimulationComponentRemoved, onSimulationEnded, onSimulationPaused, onSimulationResumed, onSimulationStarted, onSimulationStopped, onStepEnded, onStepStarted
-
Constructor Details
-
InRangeCommunicator
-
-
Method Details
-
setRange
public void setRange(double range) -
getRange
public double getRange() -
getExpectedRecipients
- Specified by:
getExpectedRecipientsin classCommunicator
-