T
- class of meta datapublic abstract class MetaDataType<T> extends Object implements Identifiable
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.
Constructor and Description |
---|
MetaDataType(String id) |
Modifier and Type | Method and Description |
---|---|
void |
accept(TrajectoryAcceptList trajectoryAcceptList,
Set<T> querySet)
Determines for a set of
trajectory 's from a single GTU, which may be accepted according to this meta data type. |
abstract String |
formatValue(String format,
T value)
Formats the value into a string.
|
String |
getId() |
abstract T |
getValue(GtuDataInterface gtu)
Retrieves the value of the meta data of this type from a GTU.
|
String |
toString() |
public MetaDataType(String id)
id
- String; idpublic final String getId()
getId
in interface Identifiable
public abstract T getValue(GtuDataInterface gtu)
gtu
- GtuDataInterface; gtu to retrieve the value fromnull
if not applicable.public abstract String formatValue(String format, T value)
String.format(format, value.si);
format
- String; formatvalue
- T; valuepublic void accept(TrajectoryAcceptList trajectoryAcceptList, Set<T> querySet)
trajectory
's from a single GTU, which may be accepted according to this meta data type.
As a single GTU may have several trajectories for a single TrajectoryGroup
object, the specified
TrajectoryGroup
's may have duplicates. As the trajectory
's are from a single GTU, the meta data is equal
for all. Implementations of this method may for instance:
Trajectory
s' meta data that all may be accepted.Trajectory
's whether they are acceptable.trajectoryAcceptList
- TrajectoryAcceptList; containing Trajectory
's and TrajectoryGroup
's
pertaining to a single GTUquerySet
- Set<T>; set of values in the query for this metadata typeCopyright © 2014–2019 Delft University of Technology. All rights reserved.