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
-
Method Summary
Modifier and TypeMethodDescriptiongetExpectedRecipients
(Message message) double
getRange()
void
setRange
(double range) Methods inherited from class org.baseagent.comms.Communicator
getType, sendDirectedMessage, sendMessage
Methods inherited from class org.baseagent.sim.SimulationComponent
getSimulation, getUUID, setSimulation
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
getExpectedRecipients
in classCommunicator
-