public enum StreetTraversalPermission extends Enum<StreetTraversalPermission>
Enum Constant and Description |
---|
ALL |
BICYCLE |
BICYCLE_AND_CAR |
CAR |
NONE |
PEDESTRIAN |
PEDESTRIAN_AND_BICYCLE |
PEDESTRIAN_AND_CAR |
Modifier and Type | Field and Description |
---|---|
int |
code |
Modifier and Type | Method and Description |
---|---|
StreetTraversalPermission |
add(StreetTraversalPermission perm) |
boolean |
allows(StreetTraversalPermission perm) |
boolean |
allows(TraverseMode mode)
Returns true if the given mode is allowed to use this street.
|
boolean |
allows(TraverseModeSet modes)
Returns true if any of the specified modes are allowed to use this street.
|
boolean |
allowsAnything()
Returns true if there are any modes allowed by this permission.
|
boolean |
allowsNothing()
Returns true if there no modes are by this permission.
|
static StreetTraversalPermission |
get(int code) |
StreetTraversalPermission |
intersection(StreetTraversalPermission perm)
Returns intersection of allowed permissions between current permissions and given permissions
|
StreetTraversalPermission |
modify(boolean permissive,
StreetTraversalPermission perm) |
StreetTraversalPermission |
remove(StreetTraversalPermission perm) |
static StreetTraversalPermission |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static StreetTraversalPermission[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final StreetTraversalPermission NONE
public static final StreetTraversalPermission PEDESTRIAN
public static final StreetTraversalPermission BICYCLE
public static final StreetTraversalPermission PEDESTRIAN_AND_BICYCLE
public static final StreetTraversalPermission CAR
public static final StreetTraversalPermission PEDESTRIAN_AND_CAR
public static final StreetTraversalPermission BICYCLE_AND_CAR
public static final StreetTraversalPermission ALL
public static StreetTraversalPermission[] values()
for (StreetTraversalPermission c : StreetTraversalPermission.values()) System.out.println(c);
public static StreetTraversalPermission 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 static StreetTraversalPermission get(int code)
public StreetTraversalPermission add(StreetTraversalPermission perm)
public StreetTraversalPermission intersection(StreetTraversalPermission perm)
perm
- public StreetTraversalPermission remove(StreetTraversalPermission perm)
public StreetTraversalPermission modify(boolean permissive, StreetTraversalPermission perm)
public boolean allows(StreetTraversalPermission perm)
public boolean allows(TraverseModeSet modes)
public boolean allows(TraverseMode mode)
public boolean allowsAnything()
public boolean allowsNothing()
Copyright © 2018. All rights reserved.