SortedSetPerceptionIterable.java

  1. package org.opentrafficsim.road.gtu.lane.perception;

  2. import java.util.TreeSet;
  3. import java.util.function.Supplier;

  4. import org.opentrafficsim.road.gtu.lane.perception.headway.Headway;

  5. /**
  6.  * Simple class implementing a SortedSet. This is mainly for backwards compatibility. Methods that determine the elements 1-by-1
  7.  * are much preferred for efficiency.
  8.  * <p>
  9.  * Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
  10.  * BSD-style license. See <a href="http://opentrafficsim.org/node/13">OpenTrafficSim License</a>.
  11.  * <p>
  12.  * @version $Revision$, $LastChangedDate$, by $Author$, initial version 19 feb. 2018 <br>
  13.  * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a>
  14.  * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a>
  15.  * @author <a href="http://www.transport.citg.tudelft.nl">Wouter Schakel</a>
  16.  * @param <H> headway type
  17.  * @param <U> underlying object type
  18.  */
  19. @Deprecated
  20. public class SortedSetPerceptionIterable<H extends Headway, U> extends TreeSet<H> implements PerceptionCollectable<H, U>
  21. {

  22.     /** */
  23.     private static final long serialVersionUID = 20180219L;

  24.     /** {@inheritDoc} */
  25.     @Override
  26.     public <C, I> C collect(final Supplier<I> identity, final PerceptionAccumulator<? super U, I> accumulator,
  27.             final PerceptionFinalizer<C, I> finalizer)
  28.     {
  29.         throw new UnsupportedOperationException();
  30.     }

  31. }