Class ApiVersion
java.lang.Object
org.springframework.boot.buildpack.platform.docker.type.ApiVersion
API Version number comprised of a major and minor value.
- Since:
- 3.4.0
- Author:
- Phillip Webb, Scott Frederick
-
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
static ApiVersion
of
(int major, int minor) static ApiVersion
Factory method to parse a string into anApiVersion
instance.boolean
supports
(ApiVersion other) Returns if this API version supports the given version.boolean
supportsAny
(ApiVersion... others) Returns if this API version supports any of the given versions.toString()
-
Method Details
-
supports
Returns if this API version supports the given version. A0.x
matches only the same version number. A 1.x or higher release matches when the versions have the same major version and a minor that is equal or greater.- Parameters:
other
- the version to check against- Returns:
- if the specified API version is supported
-
supportsAny
Returns if this API version supports any of the given versions.- Parameters:
others
- the versions to check against- Returns:
- if any of the specified API versions are supported
- See Also:
-
equals
-
hashCode
public int hashCode() -
toString
-
parse
Factory method to parse a string into anApiVersion
instance.- Parameters:
value
- the value to parse.- Returns:
- the corresponding
ApiVersion
- Throws:
IllegalArgumentException
- if the value could not be parsed
-
of
-