public class DefaultSimEntityEventMap extends Object implements SimEntityEventMap
SimEntityEventMap.
A DefaultSimEntityEventMap takes a set of SimEvents as input to its (set-argument) constructor,
and constructs the maps as specified in SimEntityEventMap
from all SimJQEvent it finds that have non-null job or queue (or both).
This implementation constructs an internal copy of the input set,
and, for what it's worth,
maintains the order of simultaneous SimJQEvents in the input of the set-argument constructor
throughput all its sets and maps
by using LinkedHashSets.
A map-argument constructor allows for the construction of objects from an unambiguous event schedule.
All getters in this implementation provide direct access to the internal sets and maps, and thus allows for external modifications. If users prefer to modify the internal data structures, they are themselves responsible for maintaining consistency.
Copyright (C) 2005-2017 Jan de Jongh, TNO
This file is covered by the LICENSE file in the root of this project.
SimJQEvent,
SimJQEvent.getQueue(),
SimJQEvent.getJob()| Constructor and Description |
|---|
DefaultSimEntityEventMap(Map<Double,Set<E>> events)
Creates a new
DefaultSimEntityEventMap, filling out all the internal sets and maps from scanning an unambiguous
schedule of SimEvents represented as a Map. |
DefaultSimEntityEventMap(Set<? extends org.javades.jsimulation.r5.SimEvent> events)
Creates a new
DefaultSimEntityEventMap, filling out all the internal sets and maps from scanning a set of
SimEvents. |
| Modifier and Type | Method and Description |
|---|---|
Set<SimJQEvent> |
getEntityEvents()
Returns the set of all
SimJQEvents this object represents. |
Map<SimJob,NavigableMap<Double,Set<SimJQEvent>>> |
getSimJobTimeSimEntityEventMap()
Returns the
SimJQEvents indexed by (in that order) job and time. |
Map<SimQueue,NavigableMap<Double,Set<SimJQEvent>>> |
getSimQueueTimeSimEntityEventMap()
Returns the
SimJQEvents indexed by (in that order) queue and time. |
NavigableMap<Double,Map<SimJob,Set<SimJQEvent>>> |
getTimeSimJobSimEntityEventMap()
Returns the
SimJQEvents indexed by (in that order) time and job. |
NavigableMap<Double,Map<SimQueue,Set<SimJQEvent>>> |
getTimeSimQueueSimEntityEventMap()
Returns the
SimJQEvents indexed by (in that order) time and queue. |
public DefaultSimEntityEventMap(Set<? extends org.javades.jsimulation.r5.SimEvent> events)
DefaultSimEntityEventMap, filling out all the internal sets and maps from scanning a set of
SimEvents.events - The set of events to parse (parsing is actually done in this constructor).public DefaultSimEntityEventMap(Map<Double,Set<E>> events)
DefaultSimEntityEventMap, filling out all the internal sets and maps from scanning an unambiguous
schedule of SimEvents represented as a Map.
The order of SimEvents in the value sets must be deterministic and must represent the "processing order"
for the simultaneous events in the set.
E - The event type.events - The events to parse represented as a Map (parsing is actually done in this constructor).IllegalArgumentException - If the time on an event does not match its corresponding key value.SimEvent.getTime()public final Set<SimJQEvent> getEntityEvents()
SimEntityEventMapSimJQEvents this object represents.getEntityEvents in interface SimEntityEventMapSimJQEvents this object represents.public final NavigableMap<Double,Map<SimQueue,Set<SimJQEvent>>> getTimeSimQueueSimEntityEventMap()
SimEntityEventMapSimJQEvents indexed by (in that order) time and queue.getTimeSimQueueSimEntityEventMap in interface SimEntityEventMapSimJQEvents indexed by (in that order) time and queue.public final Map<SimQueue,NavigableMap<Double,Set<SimJQEvent>>> getSimQueueTimeSimEntityEventMap()
SimEntityEventMapSimJQEvents indexed by (in that order) queue and time.getSimQueueTimeSimEntityEventMap in interface SimEntityEventMapSimJQEvents indexed by (in that order) queue and time.public final NavigableMap<Double,Map<SimJob,Set<SimJQEvent>>> getTimeSimJobSimEntityEventMap()
SimEntityEventMapSimJQEvents indexed by (in that order) time and job.getTimeSimJobSimEntityEventMap in interface SimEntityEventMapSimJQEvents indexed by (in that order) time and job.public final Map<SimJob,NavigableMap<Double,Set<SimJQEvent>>> getSimJobTimeSimEntityEventMap()
SimEntityEventMapSimJQEvents indexed by (in that order) job and time.getSimJobTimeSimEntityEventMap in interface SimEntityEventMapSimJQEvents indexed by (in that order) job and time.Copyright © 2018. All rights reserved.