Class VerifyPerceptionCategoryMethods


  • public class VerifyPerceptionCategoryMethods
    extends java.lang.Object

    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 Jul 22, 2016
    Author:
    Alexander Verbraeck, Peter Knoppers, Wouter Schakel
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] args)  
      void perceptionCategoryTest()
      Check that all sub-classes of AbstractPerceptionCategory have for data named TestField: testField* property of any type.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VerifyPerceptionCategoryMethods

        public VerifyPerceptionCategoryMethods()
    • Method Detail

      • perceptionCategoryTest

        public final void perceptionCategoryTest()
        Check that all sub-classes of AbstractPerceptionCategory have for data named TestField:
        • testField* property of any type. Data may be organized e.g. per lane, so type is not forced to be TimeStampedObject. Data may also be stored as e.g. testFieldLeft and testFieldRight, hence the *.
          If the field is not found, wrapped AbstractPerceptionCategory fields are checked. If either has the property the test succeeds. Methods should still be in place as forwards to the wrapped category.
        • updateTestField method
        • For boolean:
          • isTestField method returning boolean.
          • isTestFieldTimeStamped method returning TimeStampedObject.
        • For non-boolean:
          • getTestField method not returning void.
          • getTimeStampedTestField method returning TimeStampedObject.
        These tests are performed whenever a public method with these naming patterns is encountered:
        • is* (boolean).
        • is*TimeStamped (boolean).
        • get* (non-boolean).
        • getTimeStamped* (non-boolean).
        The * is subtracted as field name, with first character made upper or lower case as by convention.
      • main

        public static void main​(java.lang.String[] args)
        Parameters:
        args - arguments