Interface RestAPIVersion<T extends RestAPIVersion<T>>
- All Superinterfaces:
Comparable<T>
- All Known Implementing Classes:
RuntimeRestAPIVersion
Interface for all versions of the REST API.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E extends RestAPIVersion<E>>
EgetLatestVersion(Collection<E> versions) Accept versions and one of them as a comparator, and get the latest one.Returns the URL version prefix (e.g.booleanReturns whether this version is the default REST API version.booleanReturns whether this version is considered stable.Methods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
getURLVersionPrefix
String getURLVersionPrefix()Returns the URL version prefix (e.g. "v1") for this version.- Returns:
- URL version prefix
-
isDefaultVersion
boolean isDefaultVersion()Returns whether this version is the default REST API version.- Returns:
- whether this version is the default
-
isStableVersion
boolean isStableVersion()Returns whether this version is considered stable.- Returns:
- whether this version is stable
-
getLatestVersion
Accept versions and one of them as a comparator, and get the latest one.- Returns:
- latest version that implement RestAPIVersion interface>
-