Interface PerceptionCollectable.PerceptionAccumulator<U,​I>

  • Type Parameters:
    U - underlying object type
    I - intermediate result type
    Enclosing interface:
    PerceptionCollectable<H extends Headway,​U>

    public static interface PerceptionCollectable.PerceptionAccumulator<U,​I>
    Accumulates an object one at a time in to an accumulating intermediate result.

    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 28 feb. 2018
    Author:
    Alexander Verbraeck, Peter Knoppers, Wouter Schakel
    • Method Detail

      • accumulate

        PerceptionCollectable.Intermediate<I> accumulate​(PerceptionCollectable.Intermediate<I> intermediate,
                                                         U object,
                                                         Length distance)
        Accumulate the next object to intermediate result.
        Parameters:
        intermediate - Intermediate<I>; intermediate result before accumulation of object
        object - U; next object to include
        distance - Length; distance to the considered object
        Returns:
        I; intermediate result after accumulation of object