H
- headway typepublic class PerceptionIterableSet<H extends Headway> extends Object implements PerceptionIterable<H>
PerceptionIterable
which wraps a set. Constructors are available for an empty set, a
single-valued set, or a sorted set.
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.
Constructor and Description |
---|
PerceptionIterableSet()
Creates an empty iterable.
|
PerceptionIterableSet(H headway)
Creates a single-value iterable.
|
PerceptionIterableSet(SortedSet<H> headways)
Creates an iterable from a sorted set.
|
Modifier and Type | Method and Description |
---|---|
H |
first()
Returns the first element.
|
boolean |
isEmpty()
Returns whether this iterable is empty.
|
Iterator<H> |
iterator() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public PerceptionIterableSet()
public PerceptionIterableSet(H headway)
headway
- H; headwaypublic H first()
first
in interface PerceptionIterable<H extends Headway>
public boolean isEmpty()
isEmpty
in interface PerceptionIterable<H extends Headway>
Copyright © 2014–2019 Delft University of Technology. All rights reserved.