public enum LongitudinalDirectionality extends Enum<LongitudinalDirectionality>
Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2016-12-06 16:02:59 +0100 (Tue, 06 Dec 2016) $, @version $Revision: 2818 $, by $Author: pknoppers $,
initial version Oct 15, 2014
| Enum Constant and Description |
|---|
DIR_BOTH
Bidirectional.
|
DIR_MINUS
Direction opposite to the direction of the graph, decreasing fractional position when driving in this direction.
|
DIR_NONE
No traffic possible.
|
DIR_PLUS
Direction the same as the direction of the graph, increasing fractional position when driving in this direction.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(LongitudinalDirectionality directionality)
This method looks if this directionality "contains" the provided other directionality.
|
boolean |
isBackward()
Easy access method to test if the directionality is BACKWARD.
|
boolean |
isBackwardOrBoth()
Easy access method to test if the directionality is BACKWARD or BOTH.
|
boolean |
isBoth()
Easy access method to test if the directionality is BACKWARD or BOTH.
|
boolean |
isForward()
Easy access method to test if the directionality is FORWARD.
|
boolean |
isForwardOrBoth()
Easy access method to test if the directionality is FORWARD or BOTH.
|
static LongitudinalDirectionality |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static LongitudinalDirectionality[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final LongitudinalDirectionality DIR_PLUS
public static final LongitudinalDirectionality DIR_MINUS
public static final LongitudinalDirectionality DIR_BOTH
public static final LongitudinalDirectionality DIR_NONE
public static LongitudinalDirectionality[] values()
for (LongitudinalDirectionality c : LongitudinalDirectionality.values()) System.out.println(c);
public static LongitudinalDirectionality valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic final boolean contains(LongitudinalDirectionality directionality)
| THIS ↓ OTHER → | DIR_BOTH | DIR_PLUS | DIR_MINUS | DIR_NONE |
| DIR_BOTH | true | true | true | true |
| DIR_PLUS | false | true | false | true |
| DIR_MINUS | false | false | true | true |
| DIR_NONE | false | false | false | true |
directionality - the directionality to compare withpublic final boolean isForwardOrBoth()
public final boolean isBackwardOrBoth()
public final boolean isForward()
public final boolean isBackward()
public final boolean isBoth()
Copyright © 2014–2016 Delft University of Technology. All rights reserved.