public enum TransportationMode extends Enum<TransportationMode>
Enum Constant and Description |
---|
BIKE |
CAR |
FOOT |
HGV |
MOTORCYCLE |
OTHER |
PSV |
VEHICLE |
Modifier and Type | Method and Description |
---|---|
boolean |
isMotorVehicle() |
static TransportationMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TransportationMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TransportationMode OTHER
public static final TransportationMode FOOT
public static final TransportationMode VEHICLE
public static final TransportationMode BIKE
public static final TransportationMode CAR
public static final TransportationMode MOTORCYCLE
public static final TransportationMode HGV
public static final TransportationMode PSV
public static TransportationMode[] values()
for (TransportationMode c : TransportationMode.values()) System.out.println(c);
public static TransportationMode 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 boolean isMotorVehicle()
Copyright © 2012–2022. All rights reserved.