Class FilterDataCrossSections
- java.lang.Object
-
- org.opentrafficsim.kpi.sampling.meta.FilterDataType<CrossSection>
-
- org.opentrafficsim.kpi.sampling.meta.FilterDataCrossSections
-
- All Implemented Interfaces:
Identifiable
public class FilterDataCrossSections extends FilterDataType<CrossSection>
Accepts trajectories that have passed all cross sections as defined in a query.Copyright (c) 2013-2022 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 FilterDataCrossSections()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(TrajectoryAcceptList trajectoryAcceptList, Set<CrossSection> querySet)Accepts all trajectory's or rejects all trajectory's depending on whether all cross sections have been crossed.StringformatValue(String format, CrossSection value)Formats the value into a string.CrossSectiongetValue(GtuDataInterface gtu)Retrieves the value of the meta data of this type from a GTU.StringtoString()-
Methods inherited from class org.opentrafficsim.kpi.sampling.meta.FilterDataType
getId
-
-
-
-
Method Detail
-
getValue
public final CrossSection getValue(GtuDataInterface gtu)
Retrieves the value of the meta data of this type from a GTU.- Specified by:
getValuein classFilterDataType<CrossSection>- Parameters:
gtu- GtuDataInterface; gtu to retrieve the value from- Returns:
- value of the meta data of this type from a GTU, may be
nullif not applicable.
-
formatValue
public String formatValue(String format, CrossSection value)
Formats the value into a string. If the value is numeric, the default implementation is:String.format(format, value.si);
- Specified by:
formatValuein classFilterDataType<CrossSection>- Parameters:
format- String; formatvalue- T; value- Returns:
- formatted value
-
accept
public final void accept(TrajectoryAcceptList trajectoryAcceptList, Set<CrossSection> querySet)
Accepts all trajectory's or rejects all trajectory's depending on whether all cross sections have been crossed.- Overrides:
acceptin classFilterDataType<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 String toString()
- Overrides:
toStringin classFilterDataType<CrossSection>
-
-