public final class Version extends Object implements Comparable<Version>, Serializable
| Constructor and Description |
|---|
Version(Class cls)
Constrcuts new
Version. |
Version(Package pkg)
Constrcuts new
Version. |
Version(String name,
int major,
int minor,
int patch,
VersionType type)
Constructs new
Version. |
Version(String name,
String version)
Constrcuts new
Version. |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Version version) |
int |
hashCode() |
int |
major()
Returns major version number.
|
int |
minor()
Returns minor version number.
|
String |
name()
Returns version name.
|
int |
patch()
Returns patch number.
|
String |
toString() |
VersionType |
type()
Returns
VersionType. |
public Version(@Nullable Class cls)
Version.cls - Class to retrieve version forpublic Version(@Nullable Package pkg)
Version.pkg - Package to retrieve version forpublic Version(@Nullable String name, @Nullable String version)
Version.name - version nameversion - semantic versionpublic Version(@NotNull String name, int major, int minor, int patch, @NotNull VersionType type)
Version.name - version namemajor - major version numberminor - minor version numberpatch - patch numbertype - VersionTypepublic int major()
public int minor()
public int patch()
@NotNull public VersionType type()
VersionType.VersionTypepublic int compareTo(Version version)
compareTo in interface Comparable<Version>Copyright © 2020. All rights reserved.