Class MetaDataCrossSections

java.lang.Object
org.opentrafficsim.kpi.sampling.meta.MetaDataType<CrossSection>
org.opentrafficsim.kpi.sampling.meta.MetaDataCrossSections
All Implemented Interfaces:
Identifiable

public class MetaDataCrossSections
extends MetaDataType<CrossSection>
Accepts trajectories that have passed all cross sections as defined 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 29, 2016
Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
  • Constructor Summary

    Constructors 
    Constructor Description
    MetaDataCrossSections()  
  • Method Summary

    Modifier and Type Method Description
    void accept​(TrajectoryAcceptList trajectoryAcceptList, java.util.Set<CrossSection> querySet)
    Accepts all trajectory's or rejects all trajectory's depending on whether all cross sections have been crossed.
    java.lang.String formatValue​(java.lang.String format, CrossSection value)
    Formats the value into a string.
    CrossSection getValue​(GtuDataInterface gtu)
    Retrieves the value of the meta data of this type from a GTU.
    java.lang.String toString()

    Methods inherited from class org.opentrafficsim.kpi.sampling.meta.MetaDataType

    getId

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • getValue

      public final CrossSection getValue​(GtuDataInterface gtu)
      Retrieves the value of the meta data of this type from a GTU.
      Specified by:
      getValue in class MetaDataType<CrossSection>
      Parameters:
      gtu - GtuDataInterface; gtu to retrieve the value from
      Returns:
      value of the meta data of this type from a GTU, may be null if not applicable.
    • formatValue

      public java.lang.String formatValue​(java.lang.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:
      formatValue in class MetaDataType<CrossSection>
      Parameters:
      format - String; format
      value - T; value
      Returns:
      formatted value
    • accept

      public final void accept​(TrajectoryAcceptList trajectoryAcceptList, java.util.Set<CrossSection> querySet)
      Accepts all trajectory's or rejects all trajectory's depending on whether all cross sections have been crossed.
      Overrides:
      accept in class MetaDataType<CrossSection>
      Parameters:
      trajectoryAcceptList - TrajectoryAcceptList; containing Trajectory's and TrajectoryGroup's pertaining to a single GTU
      querySet - Set<T>; set of values in the query for this metadata type
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class MetaDataType<CrossSection>