类 Version
- java.lang.Object
-
- io.microsphere.util.Version
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static class
Version.Operator
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 int
compareTo(Version that)
boolean
eq(Version that)
CurrentVersion
is equal to thatboolean
equals(Version that)
CurrentVersion
is equal to thatboolean
equals(java.lang.Object o)
CurrentVersion
is equal to thatboolean
ge(Version that)
CurrentVersion
is greater than or equal to thatint
getMajor()
The major versionint
getMinor()
The minor versionint
getPatch()
The patchstatic Version
getVersion(java.lang.Class<?> targetClass)
Class that exposes the version.boolean
gt(Version that)
CurrentVersion
is greater than thatint
hashCode()
boolean
isGreaterOrEqual(Version that)
CurrentVersion
is greater than or equal to thatboolean
isGreaterThan(Version that)
CurrentVersion
is greater than thatboolean
isLessOrEqual(Version that)
CurrentVersion
is less than or equal to thatboolean
isLessThan(Version that)
CurrentVersion
is less than thatboolean
le(Version that)
CurrentVersion
is less than or equal to thatboolean
lt(Version that)
CurrentVersion
is less than thatstatic Version
of(int major)
static Version
of(int major, int minor)
static Version
of(int major, int minor, int patch)
static Version
of(java.lang.String version)
java.lang.String
toString()
-
-
-
方法详细资料
-
of
public static Version of(int major)
-
of
public static Version of(int major, int minor)
-
of
public static Version of(int major, int minor, int patch)
-
of
public static Version of(java.lang.String version)
-
getVersion
@Nonnull public static Version getVersion(java.lang.Class<?> targetClass)
Class that exposes the version. Fetches the "Implementation-Version" manifest attribute from the jar file.- 参数:
targetClass
- the class to exposes the version- 返回:
- non-null
-
getMajor
public int getMajor()
The major version- 返回:
- major version
-
getMinor
public int getMinor()
The minor version- 返回:
- minor version
-
getPatch
public int getPatch()
The patch- 返回:
- patch
-
gt
public boolean gt(Version that)
CurrentVersion
is greater than that- 参数:
that
- the version to be compared- 返回:
true
if greater than, orfalse
- 另请参阅:
isGreaterThan(Version)
-
isGreaterThan
public boolean isGreaterThan(Version that)
CurrentVersion
is greater than that- 参数:
that
- the version to be compared- 返回:
true
if greater than, orfalse
- 另请参阅:
gt(Version)
-
ge
public boolean ge(Version that)
CurrentVersion
is greater than or equal to that- 参数:
that
- the version to be compared- 返回:
true
if greater than, orfalse
- 另请参阅:
isGreaterOrEqual(Version)
-
isGreaterOrEqual
public boolean isGreaterOrEqual(Version that)
CurrentVersion
is greater than or equal to that- 参数:
that
- the version to be compared- 返回:
true
if greater than, orfalse
- 另请参阅:
ge(Version)
-
lt
public boolean lt(Version that)
CurrentVersion
is less than that- 参数:
that
- the version to be compared- 返回:
true
if less than, orfalse
-
isLessThan
public boolean isLessThan(Version that)
CurrentVersion
is less than that- 参数:
that
- the version to be compared- 返回:
true
if less than, orfalse
-
le
public boolean le(Version that)
CurrentVersion
is less than or equal to that- 参数:
that
- the version to be compared- 返回:
true
if less than, orfalse
- 另请参阅:
isLessOrEqual(Version)
-
isLessOrEqual
public boolean isLessOrEqual(Version that)
CurrentVersion
is less than or equal to that- 参数:
that
- the version to be compared- 返回:
true
if less than, orfalse
- 另请参阅:
le(Version)
-
eq
public boolean eq(Version that)
CurrentVersion
is equal to that- 参数:
that
- the version to be compared- 返回:
true
if equals, orfalse
-
equals
public boolean equals(Version that)
CurrentVersion
is equal to that- 参数:
that
- the version to be compared- 返回:
true
if equals, orfalse
-
equals
public boolean equals(java.lang.Object o)
CurrentVersion
is equal to that- 覆盖:
equals
在类中java.lang.Object
- 参数:
o
- the version to be compared- 返回:
true
if equals, orfalse
-
hashCode
public int hashCode()
- 覆盖:
hashCode
在类中java.lang.Object
-
toString
public java.lang.String toString()
- 覆盖:
toString
在类中java.lang.Object
-
-