Class PerceptionCollectable.Intermediate<I>

java.lang.Object
org.opentrafficsim.road.gtu.lane.perception.PerceptionCollectable.Intermediate<I>
Type Parameters:
I - intermediate result type
Enclosing interface:
PerceptionCollectable<H extends Headway,​U>

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

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

    Constructors 
    Constructor Description
    Intermediate​(I object)
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    int getNumber()
    Returns the number of the underlying object currently being accumulated, starts at 0 for the first.
    I getObject()
    Get intermediate object.
    boolean isStop()
    Method for the iterator to check if it can stop.
    void setObject​(I object)
    Set intermediate object.
    void step()
    Method for the iterator to increase the underlying object number.
    void stop()
    Method for the accumulator to indicate the iterator can stop.

    Methods inherited from class java.lang.Object

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

    • Intermediate

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

    • 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