Class ExtendedDataTypeString<G extends GtuDataInterface>
- java.lang.Object
-
- org.opentrafficsim.kpi.sampling.data.ExtendedDataType<T,java.util.List<T>,java.util.List<T>,G>
-
- org.opentrafficsim.kpi.sampling.data.ExtendedDataTypeList<java.lang.String,G>
-
- org.opentrafficsim.kpi.sampling.data.ExtendedDataTypeString<G>
-
- Type Parameters:
G- gtu data type
- All Implemented Interfaces:
Identifiable
public abstract class ExtendedDataTypeString<G extends GtuDataInterface> extends ExtendedDataTypeList<java.lang.String,G>
Copyright (c) 2013-2020 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 19 mrt. 2019
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
-
Constructor Summary
Constructors Constructor Description ExtendedDataTypeString(java.lang.String id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringformatValue(java.lang.String format, java.lang.String value)Formats the value into a string.java.lang.StringparseValue(java.lang.String string)Parses a stored string representation to original type.-
Methods inherited from class org.opentrafficsim.kpi.sampling.data.ExtendedDataTypeList
convert, getOutputValue, getStorageValue, initializeStorage, setValue
-
Methods inherited from class org.opentrafficsim.kpi.sampling.data.ExtendedDataType
equals, getId, getType, getValue, hashCode, interpolate
-
-
-
-
Method Detail
-
formatValue
public java.lang.String formatValue(java.lang.String format, java.lang.String value)Formats the value into a string. If the value is numeric, the default implementation is:String.format(format, value.si);
- Specified by:
formatValuein classExtendedDataType<java.lang.String,java.util.List<java.lang.String>,java.util.List<java.lang.String>,G extends GtuDataInterface>- Parameters:
format- String; formatvalue- T; value- Returns:
- formatted value
-
parseValue
public java.lang.String parseValue(java.lang.String string)
Parses a stored string representation to original type.- Specified by:
parseValuein classExtendedDataType<java.lang.String,java.util.List<java.lang.String>,java.util.List<java.lang.String>,G extends GtuDataInterface>- Parameters:
string- String; stored string representation- Returns:
- T; value in original type
-
-