Class ApiVersion
java.lang.Object
org.springframework.boot.buildpack.platform.docker.ApiVersion
API Version number comprised of a major and minor value.
- Since:
- 4.0.0
- Author:
- Phillip Webb, Scott Frederick
-
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()static ApiVersionof(int major, int minor) static ApiVersionFactory method to parse a string into anApiVersioninstance.booleansupports(ApiVersion other) Returns if this API version supports the given version.booleansupportsAny(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.xmatches 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
-
toString
-
parse
Factory method to parse a string into anApiVersioninstance.- Parameters:
value- the value to parse.- Returns:
- the corresponding
ApiVersion - Throws:
IllegalArgumentException- if the value could not be parsed
-
of
-