public final class Query extends Object
Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
| Constructor and Description |
|---|
Query(Sampling sampling,
String description,
boolean connected,
MetaDataSet metaDataSet) |
Query(Sampling sampling,
String description,
boolean connected,
MetaDataSet metaDataSet,
org.djunits.value.vdouble.scalar.Duration interval) |
Query(Sampling sampling,
String description,
boolean connected,
MetaDataSet metaDataSet,
org.djunits.value.vdouble.scalar.Frequency updateFrequency) |
Query(Sampling sampling,
String description,
boolean connected,
MetaDataSet metaDataSet,
org.djunits.value.vdouble.scalar.Frequency updateFrequency,
org.djunits.value.vdouble.scalar.Duration interval) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSpaceTimeRegion(LaneDirection laneDirection,
org.djunits.value.vdouble.scalar.Length xStart,
org.djunits.value.vdouble.scalar.Length xEnd,
org.djunits.value.vdouble.scalar.Duration tStart,
org.djunits.value.vdouble.scalar.Duration tEnd)
Defines a region in space and time for which this query is valid.
|
void |
addSpaceTimeRegionLink(CrossSectionLink link,
org.opentrafficsim.core.gtu.GTUDirectionality direction,
org.djunits.value.vdouble.scalar.Length xStart,
org.djunits.value.vdouble.scalar.Length xEnd,
org.djunits.value.vdouble.scalar.Duration tStart,
org.djunits.value.vdouble.scalar.Duration tEnd)
Defines a region in space and time for which this query is valid.
|
boolean |
equals(Object obj) |
String |
getDescription() |
String |
getId()
return the unique id for the query.
|
org.djunits.value.vdouble.scalar.Duration |
getInterval() |
Iterator<Map.Entry<MetaDataType<?>,Set<?>>> |
getMetaDataSetIterator() |
Iterator<SpaceTimeRegion> |
getSpaceTimeIterator() |
<T> List<TrajectoryGroup> |
getTrajectoryGroups(org.djunits.value.vdouble.scalar.Duration startTime,
org.djunits.value.vdouble.scalar.Duration endTime)
Returns a list of TrajectoryGroups in accordance with the query.
|
org.djunits.value.vdouble.scalar.Frequency |
getUpdateFrequency() |
int |
hashCode() |
boolean |
isConnected() |
int |
metaDataSize() |
int |
spaceTimeRegionSize() |
String |
toString() |
public Query(Sampling sampling, String description, boolean connected, MetaDataSet metaDataSet)
sampling - samplingdescription - descriptionconnected - whether the space-time regions are longitudinally connectedmetaDataSet - meta dataNullPointerException - if sampling, description or metaDataSet is nullpublic Query(Sampling sampling, String description, boolean connected, MetaDataSet metaDataSet, org.djunits.value.vdouble.scalar.Duration interval)
sampling - samplingdescription - descriptionconnected - whether the space-time regions are longitudinally connectedmetaDataSet - meta datainterval - interval to gather statistics overNullPointerException - if sampling, description or metaDataSet is nullpublic Query(Sampling sampling, String description, boolean connected, MetaDataSet metaDataSet, org.djunits.value.vdouble.scalar.Frequency updateFrequency)
sampling - samplingdescription - descriptionconnected - whether the space-time regions are longitudinally connectedmetaDataSet - meta dataupdateFrequency - update frequencyNullPointerException - if sampling, description or metaDataSet is nullpublic Query(Sampling sampling, String description, boolean connected, MetaDataSet metaDataSet, org.djunits.value.vdouble.scalar.Frequency updateFrequency, org.djunits.value.vdouble.scalar.Duration interval)
sampling - samplingdescription - descriptionconnected - whether the space-time regions are longitudinally connectedmetaDataSet - meta dataupdateFrequency - update frequencyinterval - interval to gather statistics overNullPointerException - if sampling, description or metaDataSet is nullpublic String getId()
public String getDescription()
public boolean isConnected()
public org.djunits.value.vdouble.scalar.Frequency getUpdateFrequency()
public org.djunits.value.vdouble.scalar.Duration getInterval()
public int metaDataSize()
public Iterator<Map.Entry<MetaDataType<?>,Set<?>>> getMetaDataSetIterator()
public void addSpaceTimeRegionLink(CrossSectionLink link, org.opentrafficsim.core.gtu.GTUDirectionality direction, org.djunits.value.vdouble.scalar.Length xStart, org.djunits.value.vdouble.scalar.Length xEnd, org.djunits.value.vdouble.scalar.Duration tStart, org.djunits.value.vdouble.scalar.Duration tEnd)
link - linkdirection - directionxStart - start positionxEnd - end positiontStart - start timetEnd - end timepublic void addSpaceTimeRegion(LaneDirection laneDirection, org.djunits.value.vdouble.scalar.Length xStart, org.djunits.value.vdouble.scalar.Length xEnd, org.djunits.value.vdouble.scalar.Duration tStart, org.djunits.value.vdouble.scalar.Duration tEnd)
laneDirection - lane directionxStart - start positionxEnd - end positiontStart - start timetEnd - end timepublic int spaceTimeRegionSize()
public Iterator<SpaceTimeRegion> getSpaceTimeIterator()
public <T> List<TrajectoryGroup> getTrajectoryGroups(org.djunits.value.vdouble.scalar.Duration startTime, org.djunits.value.vdouble.scalar.Duration endTime)
TrajectoryGroup contains Trajectory
objects pertaining to a SpaceTimeRegion from the query. A Trajectory is only included if all the meta
data of this query accepts the trajectory.T - underlying class of meta data type and its valuestartTime - start time of interval to get trajectory groups forendTime - start time of interval to get trajectory groups forRuntimeException - if a meta data type returned a boolean array with incorrect lengthCopyright © 2014–2016 Delft University of Technology. All rights reserved.