Class MetaDataGtuType
java.lang.Object
org.opentrafficsim.kpi.sampling.meta.MetaDataType<GtuTypeDataInterface>
org.opentrafficsim.kpi.sampling.meta.MetaDataGtuType
- All Implemented Interfaces:
Identifiable
public class MetaDataGtuType extends MetaDataType<GtuTypeDataInterface>
Accepts trajectories with a GTUType included in a set 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 22, 2016
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Constructor Summary
Constructors Constructor Description MetaDataGtuType() -
Method Summary
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()
-
Constructor Details
-
MetaDataGtuType
public MetaDataGtuType()
-
-
Method Details
-
getValue
Retrieves the value of the meta data of this type from a GTU.- Specified by:
getValuein classMetaDataType<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
Formats the value into a string. If the value is numeric, the default implementation is:String.format(format, value.si);
- Specified by:
formatValuein classMetaDataType<GtuTypeDataInterface>- Parameters:
format- String; formatvalue- T; value- Returns:
- formatted value
-
toString
- Overrides:
toStringin classMetaDataType<GtuTypeDataInterface>
-