Class PerceptionCollectable.Intermediate<I>

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

    public static class PerceptionCollectable.Intermediate<I>
    extends Object
    Wrapper of intermediate result with info for the iterator algorithm.

    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 3 apr. 2018
    Author:
    Alexander Verbraeck, Peter Knoppers, Wouter Schakel]
    • Constructor Detail

      • Intermediate

        public Intermediate​(I object)
        Constructor.
        Parameters:
        object - I; identity value
    • Method Detail

      • getObject

        public I getObject()
        Get intermediate object.
        Returns:
        I; intermediate object
      • setObject

        public void setObject​(I object)
        Set intermediate object.
        Parameters:
        object - I; intermediate object
      • getNumber

        public int getNumber()
        Returns the number of the underlying object currently being accumulated, starts at 0 for the first.
        Returns:
        int; number of the underlying object currently being accumulated
      • step

        public void step()
        Method for the iterator to increase the underlying object number.
      • stop

        public void stop()
        Method for the accumulator to indicate the iterator can stop.
      • isStop

        public boolean isStop()
        Method for the iterator to check if it can stop.
        Returns:
        boolean; whether the iterator can stop