Package io.jenetics.jpx
Enum GPX.Version
- java.lang.Object
-
- java.lang.Enum<GPX.Version>
-
- io.jenetics.jpx.GPX.Version
-
- All Implemented Interfaces:
Serializable
,Comparable<GPX.Version>
- Enclosing class:
- GPX
public static enum GPX.Version extends Enum<GPX.Version>
Represents the available GPX versions.- Since:
- 1.3
- Version:
- 1.3
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getNamespaceURI()
Return the namespace URI of this version.String
getValue()
Return the version string value.static GPX.Version
of(String version)
Return the version from the givenversion
string.static GPX.Version
valueOf(String name)
Returns the enum constant of this type with the specified name.static GPX.Version[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
V10
public static final GPX.Version V10
The GPX version 1.0. This version can be read and written.- See Also:
- GPX 1.0
-
V11
public static final GPX.Version V11
The GPX version 1.1. This is the default version and can be read and written.- See Also:
- GPX 1.1
-
-
Method Detail
-
values
public static GPX.Version[] 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 (GPX.Version c : GPX.Version.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static GPX.Version 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
-
getValue
public String getValue()
Return the version string value.- Returns:
- the version string value
-
getNamespaceURI
public String getNamespaceURI()
Return the namespace URI of this version.- Returns:
- the namespace URI of this version
- Since:
- 1.5
-
of
public static GPX.Version of(String version)
Return the version from the givenversion
string. Allowed values are "1.0" and "1.1".- Parameters:
version
- the version string- Returns:
- the version from the given
version
string - Throws:
IllegalArgumentException
- if the givenversion
string is neither "1.0" nor "1.1"NullPointerException
- if the givenversion
string isnull
-
-