Class MetaDataCrossSections
java.lang.Object
org.opentrafficsim.kpi.sampling.meta.MetaDataType<CrossSection>
org.opentrafficsim.kpi.sampling.meta.MetaDataCrossSections
- All Implemented Interfaces:
Identifiable
public class MetaDataCrossSections extends MetaDataType<CrossSection>
Accepts trajectories that have passed all cross sections as defined in a query.
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version Sep 29, 2016
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Constructor Summary
Constructors Constructor Description MetaDataCrossSections()
-
Method Summary
Modifier and Type Method Description void
accept(TrajectoryAcceptList trajectoryAcceptList, java.util.Set<CrossSection> querySet)
Accepts all trajectory's or rejects all trajectory's depending on whether all cross sections have been crossed.java.lang.String
formatValue(java.lang.String format, CrossSection value)
Formats the value into a string.CrossSection
getValue(GtuDataInterface gtu)
Retrieves the value of the meta data of this type from a GTU.java.lang.String
toString()
-
Constructor Details
-
MetaDataCrossSections
public MetaDataCrossSections()
-
-
Method Details
-
getValue
Retrieves the value of the meta data of this type from a GTU.- Specified by:
getValue
in classMetaDataType<CrossSection>
- Parameters:
gtu
- GtuDataInterface; gtu to retrieve the value from- Returns:
- value of the meta data of this type from a GTU, may be
null
if not applicable.
-
formatValue
Formats the value into a string. If the value is numeric, the default implementation is:String.format(format, value.si);
- Specified by:
formatValue
in classMetaDataType<CrossSection>
- Parameters:
format
- String; formatvalue
- T; value- Returns:
- formatted value
-
accept
public final void accept(TrajectoryAcceptList trajectoryAcceptList, java.util.Set<CrossSection> querySet)Accepts all trajectory's or rejects all trajectory's depending on whether all cross sections have been crossed.- Overrides:
accept
in classMetaDataType<CrossSection>
- Parameters:
trajectoryAcceptList
- TrajectoryAcceptList; containingTrajectory
's andTrajectoryGroup
's pertaining to a single GTUquerySet
- Set<T>; set of values in the query for this metadata type
-
toString
public java.lang.String toString()- Overrides:
toString
in classMetaDataType<CrossSection>
-