Class FilterDataGtuType
- java.lang.Object
-
- org.opentrafficsim.kpi.sampling.meta.FilterDataType<GtuTypeDataInterface>
-
- org.opentrafficsim.kpi.sampling.meta.FilterDataGtuType
-
- All Implemented Interfaces:
Identifiable
public class FilterDataGtuType extends FilterDataType<GtuTypeDataInterface>
Accepts trajectories with a GTUType included in a set 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 22, 2016
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
-
Constructor Summary
Constructors Constructor Description FilterDataGtuType()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringformatValue(String format, GtuTypeDataInterface value)Formats the value into a string.GtuTypeDataInterfacegetValue(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
accept, getId
-
-
-
-
Method Detail
-
getValue
public final GtuTypeDataInterface getValue(GtuDataInterface gtu)
Retrieves the value of the meta data of this type from a GTU.- Specified by:
getValuein classFilterDataType<GtuTypeDataInterface>- 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, GtuTypeDataInterface 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<GtuTypeDataInterface>- Parameters:
format- String; formatvalue- T; value- Returns:
- formatted value
-
toString
public String toString()
- Overrides:
toStringin classFilterDataType<GtuTypeDataInterface>
-
-