- java.lang.Object
-
- java.lang.Enum<LegalTrafficSide>
-
- org.arakhne.afc.gis.road.primitive.LegalTrafficSide
-
- All Implemented Interfaces:
Serializable
,Comparable<LegalTrafficSide>
public enum LegalTrafficSide extends Enum<LegalTrafficSide>
Legal side of the traffic of the vehicles on the road segments.When left-side traffic direction rule is used, it is supposed that all vehicles are going on the left side of the roads. For example, this rule is used in UK.
Red: drives on right; Blue: drive on left.- Since:
- 14.0
- Version:
- 17.0 2020-01-04 14:41:55
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.gis
- Maven Artifact Id:
- gisroad
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LegalTrafficSide
get(Locale locale)
Replies the legal traffic side according to the given locale.static LegalTrafficSide
get(CountryCode country)
Replies the legal traffic side according to the given country code.static LegalTrafficSide
getCurrent()
Replies the legal traffic side according to your current locale.static LegalTrafficSide
valueOf(String name)
Returns the enum constant of this type with the specified name.static LegalTrafficSide[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LEFT
public static final LegalTrafficSide LEFT
Vehicles are moving on left side of the roads.
-
RIGHT
public static final LegalTrafficSide RIGHT
Vehicles are moving on right side of the roads.
-
-
Method Detail
-
values
public static LegalTrafficSide[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (LegalTrafficSide c : LegalTrafficSide.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static LegalTrafficSide valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getCurrent
public static LegalTrafficSide getCurrent()
Replies the legal traffic side according to your current locale.- Returns:
- the legal traffic side according to your current locale.
-
get
public static LegalTrafficSide get(Locale locale)
Replies the legal traffic side according to the given locale.- Parameters:
locale
- the locale.- Returns:
- the legal traffic side according to the given locale.
-
get
public static LegalTrafficSide get(CountryCode country)
Replies the legal traffic side according to the given country code.- Parameters:
country
- the country code.- Returns:
- the legal traffic side according to the given country code.
-
-