public final class Version extends Object implements Comparable<Version>
| Modifier and Type | Method and Description |
|---|---|
String |
build()
Returns the build version number.
|
int |
compareTo(Version that) |
boolean |
equals(Object object) |
static Version |
from(int major,
int minor,
int patch,
String build)
Returns a new version from the given parts.
|
static Version |
from(String version)
Returns a new version from the given version string.
|
int |
hashCode() |
int |
major()
Returns the major version number.
|
int |
minor()
Returns the minor version number.
|
int |
patch()
Returns the patch version number.
|
String |
toString() |
public static Version from(String version)
version - the version stringIllegalArgumentException - if the version string is invalidpublic static Version from(int major, int minor, int patch, String build)
major - the major version numberminor - the minor version numberpatch - the patch version numberbuild - the build version numberpublic int major()
public int minor()
public int patch()
public String build()
public int compareTo(Version that)
compareTo in interface Comparable<Version>Copyright © 2013–2018. All rights reserved.