public class Version extends Object
Modifier and Type | Field and Description |
---|---|
static Version |
UNDEFINED_DEVELOPMENT_VERSION |
static Version |
UNDEFINED_FROM |
static Version |
UNDEFINED_TO |
Modifier | Constructor and Description |
---|---|
protected |
Version(int major,
int minor,
int patch)
Convenience constructor that could be used to register Deltas or update tasks.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getClassifier() |
short |
getMajor() |
short |
getMinor() |
short |
getPatch() |
int |
hashCode() |
boolean |
isBeforeOrEquivalent(Version other) |
boolean |
isEquivalent(Version other)
Compares major, minor and patch revisions of this Version against the given Version.
|
boolean |
isStrictlyAfter(Version other) |
static Version |
parseVersion(int major,
int minor,
int patch) |
static Version |
parseVersion(String versionStr)
Factory method that will parse a version string and return the correct Version implementation.
|
String |
toString() |
public static final Version UNDEFINED_FROM
public static final Version UNDEFINED_TO
public static final Version UNDEFINED_DEVELOPMENT_VERSION
protected Version(int major, int minor, int patch)
public static Version parseVersion(String versionStr)
versionStr
- version as string, for example 1.2.3-test
. The String
${project.version}
is interpreted as an undefined version during development ant it will always
match version rangespublic static Version parseVersion(int major, int minor, int patch)
public boolean isEquivalent(Version other)
public boolean isStrictlyAfter(Version other)
public boolean isBeforeOrEquivalent(Version other)
public short getMajor()
public short getMinor()
public short getPatch()
public String getClassifier()
Copyright © 2003–2018 Magnolia International Ltd.. All rights reserved.