public enum LongitudinalDirectionality extends Enum<LongitudinalDirectionality>
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.
$LastChangedDate: 2019-05-17 01:48:31 +0200 (Fri, 17 May 2019) $, @version $Revision: 5496 $, by $Author: wjschakel $,
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.
|
ImmutableSet<GTUDirectionality> |
getDirectionalities()
Retrieve the permitted driving directions.
|
LongitudinalDirectionality |
intersect(LongitudinalDirectionality other)
Compute the intersection of this LongitudinalDirectionality with another LongitudinalDirectionality.
|
LongitudinalDirectionality |
invert()
Return the inverse if this LongitudinalDirectionality.
|
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.
|
boolean |
isNone()
Easy access method to test if the directionality is NONE.
|
boolean |
permits(GTUDirectionality direction)
Check if a direction is permitted by this LongitudinalDirectionality.
|
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 ImmutableSet<GTUDirectionality> getDirectionalities()
public 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 - LongitudinalDirectionality; the directionality to compare withpublic final boolean isForwardOrBoth()
public final boolean isBackwardOrBoth()
public final boolean isForward()
public final boolean isBackward()
public final boolean isBoth()
public final boolean isNone()
public final LongitudinalDirectionality intersect(LongitudinalDirectionality other)
other - LongitudinalDirectionality; the other LongitudinalDirectionalitythis and otherpublic final boolean permits(GTUDirectionality direction)
direction - GTUDirectionality; the direction of motion in which a GTU moves, or wants to movepublic LongitudinalDirectionality invert()
Copyright © 2014–2019 Delft University of Technology. All rights reserved.