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(Sampler sampling,
String description,
MetaDataSet metaDataSet) |
Query(Sampler sampling,
String description,
MetaDataSet metaDataSet,
org.djunits.value.vdouble.scalar.Duration interval) |
Query(Sampler sampling,
String description,
MetaDataSet metaDataSet,
org.djunits.value.vdouble.scalar.Frequency updateFrequency) |
Query(Sampler sampling,
String description,
MetaDataSet metaDataSet,
org.djunits.value.vdouble.scalar.Frequency updateFrequency,
org.djunits.value.vdouble.scalar.Duration interval) |
Modifier and Type | Method and Description |
---|---|
void |
addSpaceTimeRegion(KpiLaneDirection laneDirection,
org.djunits.value.vdouble.scalar.Length startPosition,
org.djunits.value.vdouble.scalar.Length endPosition,
org.djunits.value.vdouble.scalar.Time startTime,
org.djunits.value.vdouble.scalar.Time endTime)
Defines a region in space and time for which this query is valid.
|
void |
addSpaceTimeRegionLink(LinkDataInterface link,
KpiGtuDirectionality direction,
org.djunits.value.vdouble.scalar.Length startPosition,
org.djunits.value.vdouble.scalar.Length endPosition,
org.djunits.value.vdouble.scalar.Time startTime,
org.djunits.value.vdouble.scalar.Time endTime)
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.Time startTime,
org.djunits.value.vdouble.scalar.Time endTime)
Returns a list of TrajectoryGroups in accordance with the query.
|
org.djunits.value.vdouble.scalar.Frequency |
getUpdateFrequency() |
int |
hashCode() |
int |
metaDataSize() |
int |
spaceTimeRegionSize() |
String |
toString() |
public Query(Sampler sampling, String description, MetaDataSet metaDataSet)
sampling
- samplingdescription
- descriptionmetaDataSet
- meta dataNullPointerException
- if sampling, description or metaDataSet is nullpublic Query(Sampler sampling, String description, MetaDataSet metaDataSet, org.djunits.value.vdouble.scalar.Duration interval)
sampling
- samplingdescription
- descriptionmetaDataSet
- meta datainterval
- interval to gather statistics overNullPointerException
- if sampling, description or metaDataSet is nullpublic Query(Sampler sampling, String description, MetaDataSet metaDataSet, org.djunits.value.vdouble.scalar.Frequency updateFrequency)
sampling
- samplingdescription
- descriptionmetaDataSet
- meta dataupdateFrequency
- update frequencyNullPointerException
- if sampling, description or metaDataSet is nullpublic Query(Sampler sampling, String description, MetaDataSet metaDataSet, org.djunits.value.vdouble.scalar.Frequency updateFrequency, org.djunits.value.vdouble.scalar.Duration interval)
sampling
- samplingdescription
- descriptionmetaDataSet
- meta dataupdateFrequency
- update frequencyinterval
- interval to gather statistics overNullPointerException
- if sampling, description or metaDataSet is nullpublic String getId()
public String getDescription()
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(LinkDataInterface link, KpiGtuDirectionality direction, org.djunits.value.vdouble.scalar.Length startPosition, org.djunits.value.vdouble.scalar.Length endPosition, org.djunits.value.vdouble.scalar.Time startTime, org.djunits.value.vdouble.scalar.Time endTime)
link
- linkdirection
- directionstartPosition
- start positionendPosition
- end positionstartTime
- start timeendTime
- end timepublic void addSpaceTimeRegion(KpiLaneDirection laneDirection, org.djunits.value.vdouble.scalar.Length startPosition, org.djunits.value.vdouble.scalar.Length endPosition, org.djunits.value.vdouble.scalar.Time startTime, org.djunits.value.vdouble.scalar.Time endTime)
laneDirection
- lane directionstartPosition
- start positionendPosition
- end positionstartTime
- start timeendTime
- end timepublic int spaceTimeRegionSize()
public Iterator<SpaceTimeRegion> getSpaceTimeIterator()
public <T> List<TrajectoryGroup> getTrajectoryGroups(org.djunits.value.vdouble.scalar.Time startTime, org.djunits.value.vdouble.scalar.Time 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 forCopyright © 2014–2016 Delft University of Technology. All rights reserved.