Class AbstractPerceptionIterable.Entry

  • Enclosing class:
    AbstractPerceptionIterable<H extends Headway,​U,​C>

    protected class AbstractPerceptionIterable.Entry
    extends java.lang.Object
    Class of objects for subclasses to return. This can contain either a single object, or a set if there are multiple objects at a single location.

    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 16 feb. 2018
    Author:
    Alexander Verbraeck, Peter Knoppers, Wouter Schakel
    • Constructor Summary

      Constructors 
      Constructor Description
      Entry​(java.util.Set<U> set, C counter, Length position)
      Constructor.
      Entry​(U object, C counter, Length position)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      U getObject()
      Returns the underlying object.
      java.util.Set<U> getSet()
      Returns the underlying set.
      • Methods inherited from class java.lang.Object

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

      • Entry

        public Entry​(U object,
                     C counter,
                     Length position)
        Constructor.
        Parameters:
        object - U; object
        counter - C; counter, may be null
        position - Length; position
      • Entry

        public Entry​(java.util.Set<U> set,
                     C counter,
                     Length position)
        Constructor.
        Parameters:
        set - Set<U>; set
        counter - C; counter, may be null
        position - Length; position
    • Method Detail

      • getObject

        public U getObject()
        Returns the underlying object. Use !isSet() to check whether there is an object.
        Returns:
        U; underlying set
      • getSet

        public java.util.Set<U> getSet()
        Returns the underlying set. Use isSet() to check whether there is a set.
        Returns:
        Set<U>; underlying set