类 ApiVersion
java.lang.Object
cn.taketoday.buildpack.platform.build.ApiVersion
API Version number comprised of a major and minor value.
- 从以下版本开始:
- 4.0
- 作者:
- Phillip Webb, Scott Frederick, Harry Yang
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明(专用程序包) voidassertSupports(ApiVersion other) Assert that this API version supports the specified version.boolean(专用程序包) intgetMajor()Return the major version number.(专用程序包) intgetMinor()Return the minor version number.inthashCode()(专用程序包) 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()
-
字段详细资料
-
PATTERN
-
major
private final int major -
minor
private final int minor
-
-
构造器详细资料
-
ApiVersion
private ApiVersion(int major, int minor)
-
-
方法详细资料
-
getMajor
int getMajor()Return the major version number.- 返回:
- the major version
-
getMinor
int getMinor()Return the minor version number.- 返回:
- the minor version
-
assertSupports
Assert that this API version supports the specified version.- 参数:
other- the version to check against- 另请参阅:
-
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.- 参数:
other- the version to check against- 返回:
- if the specified API version is supported
- 另请参阅:
-
supportsAny
Returns if this API version supports any of the given versions.- 参数:
others- the versions to check against- 返回:
- if any of the specified API versions are supported
- 另请参阅:
-
equals
-
hashCode
public int hashCode() -
toString
-
parse
Factory method to parse a string into anApiVersioninstance.- 参数:
value- the value to parse.- 返回:
- the corresponding
ApiVersion - 抛出:
IllegalArgumentException- if the value could not be parsed
-
of
-