Interface RestAPIVersion<T extends RestAPIVersion<T>>
-
- All Superinterfaces:
Comparable<T>
- All Known Implementing Classes:
RuntimeRestAPIVersion
,SqlGatewayRestAPIVersion
public interface RestAPIVersion<T extends RestAPIVersion<T>> extends Comparable<T>
Interface for all versions of the REST API.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static <E extends RestAPIVersion<E>>
EgetLatestVersion(Collection<E> versions)
Accept versions and one of them as a comparator, and get the latest one.String
getURLVersionPrefix()
Returns the URL version prefix (e.g.boolean
isDefaultVersion()
Returns whether this version is the default REST API version.boolean
isStableVersion()
Returns whether this version is considered stable.-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Method Detail
-
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
static <E extends RestAPIVersion<E>> E getLatestVersion(Collection<E> versions)
Accept versions and one of them as a comparator, and get the latest one.- Returns:
- latest version that implement RestAPIVersion interface>
-
-