public class AddRemoveTracker
extends java.lang.Object
ISimulationObject
s,
removing them after they have expired.Constructor and Description |
---|
AddRemoveTracker() |
Modifier and Type | Method and Description |
---|---|
void |
add(ISimulationObject object,
double addTime,
double removeTime) |
protected IIdentifier |
getDestination(ISimulationObject object) |
protected java.util.Collection<ISimulationObject> |
getElapsedObjects(double expirationTime,
java.util.SortedMap<java.lang.Double,java.util.Collection<ISimulationObject>> map) |
protected double |
getNextElapseTime(java.util.SortedMap<java.lang.Double,java.util.Collection<ISimulationObject>> map) |
protected java.util.Collection<ISimulationObject> |
getObjectsCollection(double expirationTime,
boolean create,
java.util.SortedMap<java.lang.Double,java.util.Collection<ISimulationObject>> map) |
protected void |
handleAdditions(double currentTime,
ISensor sensor) |
protected void |
handleRemovals(double currentTime,
ISensor sensor) |
double |
update(double currentTime,
ISensor sensor)
returns the next time that something will expire
|
protected java.util.Collection<ISimulationObject> getObjectsCollection(double expirationTime, boolean create, java.util.SortedMap<java.lang.Double,java.util.Collection<ISimulationObject>> map)
protected java.util.Collection<ISimulationObject> getElapsedObjects(double expirationTime, java.util.SortedMap<java.lang.Double,java.util.Collection<ISimulationObject>> map)
protected double getNextElapseTime(java.util.SortedMap<java.lang.Double,java.util.Collection<ISimulationObject>> map)
public void add(ISimulationObject object, double addTime, double removeTime)
public double update(double currentTime, ISensor sensor)
currentTime
- sensor
- protected void handleAdditions(double currentTime, ISensor sensor)
protected void handleRemovals(double currentTime, ISensor sensor)
protected IIdentifier getDestination(ISimulationObject object)