Enum ServiceVersion
- All Implemented Interfaces:
Serializable
,Comparable<ServiceVersion>
JPARS service version.
- Author:
- Dmitry Kornilov
-
Enum Constant Summary
Enum ConstantDescriptionThe latest version.Added only for legacy reasons.The same as NO_VERSION, but v1.0 is specified in the URL.Version 2.0. -
Method Summary
Modifier and TypeMethodDescriptionstatic ServiceVersion
Returns enumeration value by version number as it appears in URI.getCode()
Returns the version as in appears in URI.Gets aFeatureSet
related to this service version.static boolean
Checks if ServiceVersion with given code exists.static ServiceVersion
Returns the enum constant of this type with the specified name.static ServiceVersion[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
NO_VERSION
Added only for legacy reasons. In early versions version number was not supported. -
VERSION_1_0
The same as NO_VERSION, but v1.0 is specified in the URL. -
VERSION_2_0
Version 2.0. Supports pagination and other new features. -
LATEST
The latest version.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-
getCode
Returns the version as in appears in URI.- Returns:
- the version.
-
fromCode
Returns enumeration value by version number as it appears in URI.- Parameters:
version
- version as it appears in URI.- Returns:
- ServiceVersion.
- Throws:
IllegalArgumentException
- in case that the passed code does not match any enumeration value.
-
getFeatureSet
Gets aFeatureSet
related to this service version.- Returns:
FeatureSet
related to this version.
-
hasCode
Checks if ServiceVersion with given code exists.- Parameters:
code
- Code to check.- Returns:
- true if exists, false if not.
-